On a Mac, I have a directory of html files that are all document fragments. Using the TexFinderX app, I was easily able to do a find/replace and add everything at the top of the documents that I wanted (i.e. etc.) .
Now I need to find a way to add the closing tags to all of the documents (i.e. ). TexFinderX does not have a way to do this since the documents do not have anything in common at the end of the files.
Is there a Terminal command that can do this for all html files in a directory and it’s subdirectories?
Thanks,
Linda
EDIT:
Well i was trying to keep it simple and avoid Bash scripting but it seems find doesnt allow for output redirection… so try this instead:
for f in ~/html/*.html; do echo "Processing $f file.." && cat ~/close.html >> $f; donePut your closing tags in a file… well call it
close.htmland we’ll jsut put it in your home directory/Users/youruser/close.html. Well assume your docs are in/Users/youruser/htmlOpen Terminal.app and do the following command:
youll want to test that first… my
findkung-fu is rusty