BSD Unix/mac使用sed

来源:互联网 发布:6淘宝卖家4个钻 编辑:程序博客网 时间:2024/05/17 13:42

mac下去使用sed和linux下有点区别

平时我们采用linux的sed是这样调用的:

sed -i "s/mapi-demo-web/mapi-index-web/g" pom.xml

但这样调用在mac下会出现这样的报错

sed: 1: "pom.xml": extra characters at the end of p command

查了下mac是unix系统,其调用应该如下:

sed -i "" "s/mapi-demo-web/mapi-index-web/g" pom.xml

前面加一个空串

参考链接

0 0