删除文件中含有$word字符串的某些行(在文件中修改) sed -i '/$word/d' file 转载于:https://www.cnblogs.com/ManMonth/p/3469793.html