sed command not working in mac

后端 未结 3 580
不思量自难忘°
不思量自难忘° 2021-01-13 05:13

Following sed command is not working on my lion mac.

find . -type f -exec sed -i \'s/user_dashboard/user/g\' {} \\;

I am getting this error

3条回答
  •  难免孤独
    2021-01-13 05:55

    replacing text inside a text file on the fly with sed on mac is possible.

    the command is just a little different.

    with: -i , you specify an extension where sed will save the original file prior to the sed operation.

    run the command as:

    $ sed -i _bakup -E 's/THESTRING/THEGRANDSTRING' /tmp/jestinkt.txt

提交回复
热议问题