Shell 查找两个文件之间的差异
我想找出两个文件之间的差异,只打印唯一的行 我尝试了Shell 查找两个文件之间的差异,shell,unix,Shell,Unix,我想找出两个文件之间的差异,只打印唯一的行 我尝试了uniq-u,它不起作用 diff test.sh test1.sh > test.txt sort test.txt | uniq -u > test1.txt 我还能做什么呢?IMO对shell脚本行进行排序没有任何意义。IMO对shell脚本行进行排序没有任何意义。sort12 | uniq-uuoocsort12 | uniq-uuooc > cat 1 1 2 3 4 > cat 2 2 3 4 5 >
uniq-u
,它不起作用
diff test.sh test1.sh > test.txt
sort test.txt | uniq -u > test1.txt
我还能做什么呢?IMO对shell脚本行进行排序没有任何意义。IMO对shell脚本行进行排序没有任何意义。
sort12 | uniq-u
uoocsort12 | uniq-u
uooc
> cat 1
1
2
3
4
> cat 2
2
3
4
5
> cat 1 2 | sort | uniq -u
1
5