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
You're running BSD sed (under OS X), therefore the -i flag requires an argument specifying what you want the suffix to be.
-i
Also, no files match the glob *.js.
*.js