刪除文件第一行:
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
刪除文件第一行:
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
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。