sed的s命令通常使用/作为分隔符,其实并不是只有/可以做分隔符,s命令紧邻其后的任意一个字符都可以作为分隔符,因此如果pattern或repacement中有/,所以可以这样sed ‘s,bin/bash,,’ 也可以这样sed “s@bin/bash@@”

Leave a Reply

Your email address will not be published. Required fields are marked *