- Code: Select all
sed -i -e 's/old_string/new_string/g' $1
But that returns
- Code: Select all
Error] Shell script failed: Error processing shell script
I tried to add an exit code of 0, and that removes the error, but it has no result. I tried a variation where it creates a new file:
- Code: Select all
sed -n 's/old_string/new_string/gpw newfile.md' $1
exit 0
That does create a new file, but it's empty. I tried the same thing an hour ago, and that did work, but it only copied the line with the replaced string, not the rest of the file. I can't reproduce that now.
Can anyone help me out?