Things under legendu
**
Things under legendu
It is suggested that you use Python instead of shell script to manipulate text files!
Union lines in 2 files.
:::bash comm f1 f2Or you can use
:::bash cat f1 f2 | sort -u | uniq -uShow symmetric difference
:::bash comm -3 file1 file2Show difference of 1 and 2
:::bash comm -23 file1 file2
Note that lines in files must be sorted first if you use the command comm.
To sort lines in a file,
you can use the following command.
:::bash
sort file -o file