I want to replace windows server paths (\\100.100.0.0\aaa\bbb\ccc\) with linux paths /foo/bar/ on all occurrences inside all .txt files in a folder (/xxx/yyy/zzz/).
For that I made a loop that does not seem to work either on bash or tcsh (using foreach).
#!/bin/bash FILES="/xxx/yyy/zzz/*.txt" for f in $FILES do sed -i 's+\\100.100.0.0\aaa\bbb\ccc\+/foo/bar/+g' $f done
The error I get is the following:
sed: -e expression #1, char 133: unterminated `s' command
I am guessing the issue must be in how sed handles these tricky characters but I cannot identify it.
Thank you in advance.