I have a bunch of HTML files, and I need to add <script src=ga.js></script> before each search instance of </body></html>.How would I add that to the bottom of all these files?
Add  to the bottom of a html file?
text processing
If they're actually on the same line, you can do it pretty trivially with sed:$ sed -i '/<\/body><\/html>/ i <script src=ga.js></script>' *.htmlThat finds all html files in the current directory (*.html), searches for </body></html> (/.../), and inserts (i) the script tag before it, writing the changes back to the same file (-i)