1. Sed的help 鸟哥说的 学东西 先看 help 先看man 再google 不好FQ再百度.. Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]... -n, --quiet, --silent suppress automatic printing of pattern space -e script, --expression=script add the script to the comma
说明,是通过file2内容与file1做比较,最后列出file1与file2不同的部分! 一.准备两个文件: [root@kinggoo.com test1]# cat file1 a b c d e [root@kinggoo.com test1]# cat file2 c e 二.比较方法: 方法一:grep 命令 [root@kinggoo.com test1]# grep -v -f file2 file1 a b d 方法二:comm 命令 [root@kinggoo.com test