I have been spending a lot of QT with sed lately, as I’ve tried to wrestle approx. 40 wiki files to html. The below code is still pretty janky … I have to repeat the find . – name command for each sed call … If anyone out there knows how I can do this with one command, hit me up at sean.txt@gmail.com (I disabled commenting here b/c I have yet to learn how to deal with spam bots (May Spammers Burn In Hell!!!)).
So, here’s how to use this script:
1. save it in the directory with all the wiki files you want to convert and name it anything you like. for this example let’s call wiki_to_html.sh
2. make sure it is executable: run chmod +x wiki_to_html.sh
3. rename all the wiki files to have a .html extension
4. run the script ./wiki_to_html.sh
5. BE CAREFUL. this script completely overwrites those files, so make sure to have a backup!