I have a large number of words in a text file to replace.
This script is working up until the sed command where I get:
sed: 1: \"*.js\": inval
This looks like a simple typo:
sed -i "s/{$list[0]}/{$list[1]}/g" *.js
Should be:
sed -i "s/${list[0]}/${list[1]}/g" *.js
(just like the echo lines above)
echo