UNIX Shell Scripts



  1. Overview
  2. Web Authoring
  3. Network
  4. Perforce
  5. Lawson

See Also

  1. Oracle



Parameter and error handling is sometimes left out. Analyze and tweak to reflect your environment. Make a backup of your system before running.


Web Authoring


  1. link.sh

    Create link to filename in every file under $PATH that has phrase.

    link.sh path filename.html word1 [ word2 word3 ]



    link.sh $PATH index.html#dtd Document Type Definition


    Requires the following supporting scripts:


  2. linkxml.sh

    Same as link.sh, but will only create links in filename.xml.html files.

    linkxml.sh path filename.html.xml word1 [ word2 word3 ]


    link.sh $PATH index.html#dtd Document Type Definition


  3. olink.sh

    Works like link.sh, but rather than a local link, inserts a public internet link.

    olink.sh path url word1 [ word2 word3 ]


    olink.sh $PATH java.sun.com/j2se/1.4/index.html J2SEE 1.4


  4. linkcrawl.sh

    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:

    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


  5. clean.sh

    Beautify ugly HTML. No arguments. Requires much customization.


  6. insertline.sh
    Insert a line at every occurence of word. Uses the following sed one-liner:

    sed "s/<$tag/\\ \\ <$tag/" filename.html > $i.tmp


  7. joinlines.sh
    Join two lines where first line has word at the end of the line ($).


  8. viald.sh

    Use vi to mass edit all files containing phrase.

    viald.sh word1 [ word2 word3 ]


  9. convert.sh

    Convert text files to html format

    convert.sh filename


  10. convertb.sh

    Same as above, except w/a black background.

    convertb.sh filename

    Typical usage:

    for i in `ls *.html` do convertb.sh $i done


  11. man.sh
    Write man page to text file. Often used in conjunction with convert.sh.


  12. replace.sh

    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 ]


  13. replaceslash.sh

    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 ]


  14. mkindex.sh

    Create index.html file w/links to every file with suffix.

    mkindex.sh suffix


  15. removelink.sh

    Remove a hyperlink. For example, to change...

    <a href="http://www.setgetweb.com/java.html#throwable">throwable</a>


    removelink.sh www.setgetweb.com/p/java/exceptions.html#throwable throwable


  16. ctable.sh

    Convert *.csv file into *.html file with data in table format.

    ctable.sh filename.csv


  17. rename.sh

    Rename files.

    rename.sh oldname newname


  18. makeday.sh

    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


  19. makemonth.sh

    Create HTML-tagged skeleton of current month.


  20. whatsnew.sh

    Create file, index_r.html, with links to every file modified in the last 24 hours.


  21. sqldate_proc.sh

    Create a calendar, covering a year, where every day is a hyperlink to an Oracle stored procedure


  22. lose_spaces.sh

    Remove spaces from file names


  23. luceneidx.sh

    Generate index for Lucene search engine




  1. startsmb.sh
    Start Samba




  1. backup_perforce.sh

    Make a backup of Perforce depots.


  2. reject.sh

    Reject scripts used with Perforce triggers


  3. pflag.sh
    Awk script. Cannot remember what it does.



  1. Check Batch Job Status
  2. Copy Security
  3. Dump Field Text
  4. List all programs that use a pdlib file
  5. List all programs that use a wslib file
  6. Compare programs between two productlines
  7. Create Oracle database
  8. Create Oracle User
  9. DB Maintenance Calls
  10. Get DB free space
  11. GL Chart of Accounts Report
  12. GL Report
  13. Scripts from Dave Amen
  14. Check Benefits Table
  15. DB Table Info
  16. Generate hyperlinked reference material
  17. Generate hyperlinked dbdoc files
  18. Generate hyperlinked dburf files
  19. Generate hyperlinked 4GL code
  20. Rollbacks
  21. Redo Logs
  22. Convert *.csv file into SQL table creation scripts
  23. Specs Script
  24. sum_dba.sql