mac osx sed 命令

$ sed -i "s/devicedemo/device/g" `grep devicedemo -rl ./`

sed: 1: ".//.coveragerc": invalid command code .

 

$ sed -i " " 's/devicedemo/device/g' `grep devicedemo -rl .`

sed: RE error: illegal byte sequence

 

$ export LC_COLLATE='C'

$ export LC_CTYPE='C'

 

sed -i "" 's/old_string/new_string/g' `grep old_string -rl . --exclude-dir .git`

 

posted @ 2017-01-18 16:50  开心星  阅读(824)  评论(0编辑  收藏  举报