Subscribed unsubscribe Subscribe Subscribe

hasen's tech life

Twitter: @hasen

sed: 1: "./PATH/TO/FILE ...": invalid command code .というエラーが出たので対応.

sed: 1: "./PATH/TO/FILE ...": invalid command code .というエラーが出たので対応

$ find ./ -type f | xargs sed -i 's/OLD_WORD/NEW_WORD/g'
> sed: 1: "./PATH/TO/FILE ...": invalid command code .

$ brew install gnu-sed
$ find ./ -type f | xargs gsed -i 's/OLD_WORD/NEW_WORD/g'