shell删除最后一列、删除第一行、比较文件

删除文件第一行:

sed -i '1d' filename

 

删除文件最后一列:

awk '{print $NF}' filename

 

比较文件的方法:

1)comm -3 --nocheck-order file1 file2

2) grep -v -f file1 file2:  输出file2中有file1中没有的行

diff file1 file2

相关文章

系ubuntu 下面打开终端输入:sudo apt-get install sendmail...
依家我有1个软件goagent目录(大家懂得) 放在/home/gateman/...
其实我想讲的是 cp -L关于-L参数的解释:-L, --dereferenc...
原地址:http://www.rjgc.net/control/content/content.php?...
chroot,即 change root directory (更改 root 目录)。在 li...
简单解析下, stdin就是标准输入, stdout就是标准。举个例子...