I have this line
find . -type f \( ! -name '*.plist' \) -and \( ! -name '*.mp4' \) -and \( ! -name '.DS*' \) -print0 | xargs -0 sed -i 's/AAA/BBB/g'
my intention is from the current directory recursively change all occurrences of AAA to BBB in all files except those with the following extensions: .plist, .mp4 and .DS*
but I get the message
sed: 1: "./myDir/pro ...": invalid command code .
-i
on those. Try-i.bak
-i
with it.find [...] | xargs -0 sed -i.bak 's/AAA/BBB/g'
LANG=C
before the xargs:find [...] | LANG=C xargs -0 [...]