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.
我想删除以下流
warning: the use of `mktemp' is dangerous, better use `mkstemp'
我尝试使用以下 sed 表达式:
sed \ -e '/mktemp\' is dangerous/D'
和
sed \ -e "/mktemp\' is dangerous/D"
但没有任何效果。从流中删除该行的正确表达式是什么
尝试
sed -e "/mktemp' is dangerous/D"
做这个:
$ cat /tmp/in.txt foo bar warning: the use of `mktemp' is dangerous, better use `mkstemp' baz $ sed -e "/mktemp'/d" < /tmp/in.txt foo bar baz