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
前面加一个空串