我知道在某些情况下,除了/可以在sed表达式中使用的其他字符:
sed -e 's.//..g' file因为我们用作分隔符//,file所以替换为空字符串..
但是,如果要删除匹配的行,//comment该file怎么办?
sed -e './/comment.d' file 回报
sed: -e expression #1, char 1: unknown command: `.'
Run Code Online (Sandbox Code Playgroud)