sdiff "$t1" "$t2" | grep -c '[>]'
此命令仅在第二个文件中没有空行时才有效。我该如何更改它,以便它忽略 file1 和 file2 中的空行并执行 sdiff
。
最佳答案
使用-B选项忽略空行:
sdiff -B "$t1" "$t2" | grep -c '[>]'
关于linux - 忽略空行并执行 sdiff,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48665902/