sed -i '1d;' *.js
simple, and will delete the first line from every javascript file.
you could do it a bit more throughly in python, but you said 1st line in every *.js file, no?
better yet, you could consider perl
python would work, but a Python soultion isn't a garbbled quick one-liner
and for something like this a quick painless one-liner is what you want.
perl -pi.bak -e 's/^document.*lcbmc.*\n//g' *.js
if you run this at the command line it will match any line that begins with document and contains lcbmc (including the \n--new line) and remove the line entirely. Do note, that i.bak creates a backup file .bak of everything. You may be well advised to keep this as it you may 'mess up'
afterwards just run
rm -v *.js.bak
UPDATE
Per comments I suggest running the perl scripit in the dir of the *.js files, or use find
find /startDir/ -iname '*.js' -exec perl -pi.bak -e 's/^document.*lcbmc.*\n//g' {} \;
which will:
1. if you specify the correct path
2. execute the perl one-liner on the found ({}) files.
3. the escape ; (\;) is used to string the command together,
4. so it will exec
perl -pi.bak -e 's/^document.*lcbmc.*\n//g' found-item-1.js; perl -pi.bak -e 's/^document.*lcbmc.*\n//g' found-item-2.js
etc... Some versions of find support + which you can observe the behavior of in the following question: find \; VS +
NOTE: you are able to use multiple paths with find.
find /var/www/*.js /home/eric/.apache/*.js
will find files in the /var/www/ folder and the ~/.apache folder that have are *.js files.