Insert a new line at the beginning of a file

Viewed 11416

Is it any way to find all files like *.js and insert some specific line at the beginning of the file? looking for something like:

find . -name '*.js' -exec sh -c '[insert this 'string'] "${0%.js}"' {} \;

2 Answers
Related