Parameter and error handling is sometimes left out. Analyze and tweak to reflect your environment. Make a backup of your system before running.
Create link to filename in every file under $PATH that has phrase.
link.sh path filename.html word1 [ word2 word3 ]
Example:
$PATH=/usr/local/apache/htdocs/tech/xmllink.sh $PATH index.html#dtd Document Type Definition
Requires the following supporting scripts:
Same as link.sh, but will only create links in filename.xml.html files.
linkxml.sh path filename.html.xml word1 [ word2 word3 ]
Example:
$PATH=/usr/local/apache/htdocs/tech/xml
link.sh $PATH index.html#dtd Document Type Definition
Works like link.sh, but rather than a local link, inserts a public internet link.
olink.sh path url word1 [ word2 word3 ]
Example:
$PATH=/usr/local/apache/htdocs/tech/webservicesolink.sh $PATH java.sun.com/j2se/1.4/index.html J2SEE 1.4
Crawl through subdirectories, creating linklist.sh files. These files are used by link.sh to create links to every file under $PATH. For example, if there were two files in the directory, hello.html and goodbye.html, the linklist.sh file could contain:
PATH=/an/appropriate/path
link.sh $PATH hello.html hello
link.sh $PATH goodbye.html goodbye
You can generate linklist.sh files against Java API documentation using linklist_api.sh
Beautify ugly HTML. No arguments. Requires much customization.
sed "s/<$tag/\\ \\ <$tag/" filename.html > $i.tmp
Use vi to mass edit all files containing phrase.
viald.sh word1 [ word2 word3 ]
Convert text files to html format
convert.sh filename
Same as above, except w/a black background.
convertb.sh filename
Typical usage:
for i in `ls *.html` do convertb.sh $i done
Recurse, looking for HTML files, replacing old word(s) with new word(s). Does not work if word contains a slash (/). See replaceslash.sh for that.
replace.sh word1 [ word2 word3 word4 ]
Recurse, looking for HTML files, replacing old word(s) with new word(s). Does not work if word contains a colon (:). See above to replace those types of words.
replaceslash.sh word1 [ word2 word3 word4 ]
Create index.html file w/links to every file with suffix.
mkindex.sh suffix
Remove a hyperlink. For example, to change...
<a href="http://www.setgetweb.com/java.html#throwable">throwable</a>...to...
throwable...run...
removelink.sh www.setgetweb.com/p/java/exceptions.html#throwable throwable
Convert *.csv file into *.html file with data in table format.
ctable.sh filename.csv
Rename files.
rename.sh oldname newname
Recurse through a directory tree and find all html files with a timestamp within X number of days. The results are written to html files in the current directory with names based on file dates
Create HTML-tagged skeleton of current month.
Create file, index_r.html, with links to every file modified in the last 24 hours.
Create a calendar, covering a year, where every day is a hyperlink to an Oracle stored procedure
Remove spaces from file names
Generate index for Lucene search engine
Make a backup of Perforce depots.
Reject scripts used with Perforce triggers