Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例子:
This house is big. This is my house.
等等
我想删除包含单词的行:“house”和“big”。我尝试sed以多种方式使用,但似乎没有任何效果。有什么建议吗?
sed
这可能对您有用(GNU sed):
sed '/house/!b;/big/d' file