1

I want to replace words in files recursively. This command:

find . -type f -exec sed -i -e 's/myOldTag/myNewTag/g' {} \;

does the job but I get a number of error messages:

sed: RE error: illegal byte sequence

My locale settings:

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

I tried also:

LANG=sl $$ find . -type f -exec sed -i -e 's/myOldTag/myNewTag/g' {} \;

but without success, error messages are the same.

andrej
  • 321
  • 1
  • 4
  • 13

0 Answers0