grep -vxFf b.txt a.txt > newa.txt
更好的方法是spa
comm -1 -3 b.txt a.txt > newa.txt
來自Tool in unix to subtract text files? [duplicate]unix