sed -e ‘/abc/d’ a1.txt > a2.txt

删除多个字符:

sed -e ‘/abc/d;/def/d’ a1.txt > a2.txt