继承人第一个文件用detials说 FILE1.txt :
aardvar 555-5553 1200/300 B
alponet 555-3412 2400/1200/300 A
barflyx 555-7685 1200/300 A
bitesup 555-1675 2400/1200/300 A
camelot 555-0542 300 C
然后搜索模式“camelot”在另一个文件中说FILE2.txt并删除该模式的下一行。
答案 0 :(得分:-1)
word=$(tail -n1 FILE1.txt | awk '{print $1;}')
grep -v $word FILE2.txt > FILE2.txt.modified
但是,这仅适用于FILE2.txt
中仅出现一次的单词。