UNIX Shell Scripts

 


Contents

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

See Also

  1. Oracle

 


Overview

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 ]

    Example:


    $PATH=/usr/local/apache/htdocs/tech/xml

    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 ]

    Example:

    $PATH=/usr/local/apache/htdocs/tech/xml
    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 ]

    Example:

    $PATH=/usr/local/apache/htdocs/tech/webservices
    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:

    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

     

  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>
    ...to...

    throwable
    ...run...

    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

 


Network

     

  1. startsmb.sh
    Start Samba

 


Perforce

     

  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.

 


Lawson

  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

 

Complete List

  1. Atag.sh
  2. H1tag.sh
  3. H2tag.sh
  4. TITLEtag.sh
  5. addcopyright.sh
  6. addtimestamp.sh
  7. adminidx.sh
  8. adminlink.sh
  9. adminsync.sh
  10. adset.sh
  11. aidx.sh
  12. Scripts
  13. analysis_sync.sh
  14. analysisidx.sh
  15. analysislink.sh
  16. atag.sh
  17. backup_perforce.sh
  18. cbolink.sh
  19. chart.sql
  20. Check Batch Job Status
  21. clean.sh
  22. cleanMSProject.sh
  23. cleanpdf.sh
  24. cleanwvHtml.sh
  25. cleanxml.sh
  26. contents.sh
  27. convert.sh
  28. convertb.sh
  29. convertcrawl.sh
  30. convertjira.sh
  31. convertp.sh
  32. convertxml.sh
  33. Copy Security
  34. count_tblrec.sql
  35. cprod.sh
  36. create_db.sql
  37. create_user.sql
  38. ctable.sh
  39. dbadata.sql
  40. dbmaint.sh
  41. depotdev_link.sh
  42. depotlinkf.sh
  43. depotsync.sh
  44. depotsync1.sh
  45. dhcpd-reclaim.sh
  46. diskmon.sh
  47. diskmonora.sh
  48. dmpfldtxt
  49. dumpas400
  50. find_pdlib.sh
  51. find_wslib.sh
  52. findit.sh
  53. fixanchor.sh
  54. fixurl.sh
  55. freespace.sql
  56. gcode
  57. getlogs.sh
  58. getlogs1.sh
  59. gl.sql
  60. h1tag.sh
  61. h2tag.sh
  62. h3tag.sh
  63. h4tag.sh
  64. htmlcrawl.sh
  65. idxagiliti.sh
  66. imgtag.sh
  67. UNIX Shell Scripts
  68. indeximages.sh
  69. insert.sh
  70. insertline.sh
  71. invcsplit.sh
  72. javalink.sh
  73. join.sh
  74. joinlines.sh
  75. Check BENEFITS
  76. link.sh
  77. link.sh
  78. link.shy
  79. link1.sh
  80. link_dev.sh
  81. linkapi.sh
  82. linkapi.sh.sh
  83. linkcfg.sh
  84. linkconditional.sh
  85. linkcrawl.sh
  86. linkcrawlpackage.sh
  87. linkdollar.sh
  88. linkequal.sh
  89. linklist_api.sh
  90. linkslash.sh
  91. linktld.sh
  92. linkxml.sh
  93. linkxmlconditional.sh
  94. logcount.sh
  95. login.sql
  96. logs.sh
  97. lose_spaces.sh
  98. luceneidx.sh
  99. make_epses.sh
  100. makeday.sh
  101. makemonth.sh
  102. makeyear.sh
  103. man
  104. man.sh
  105. mkindex.sh
  106. mkindexr.sh
  107. mkindexs.sh
  108. mklinklist.sh
  109. mklinklist1.sh
  110. mklinklista.sh
  111. mklinklistapi.sh
  112. mktreeidx.sh
  113. ndbdoc
  114. ndburf
  115. network.sh
  116. nslookup.sh
  117. olink.sh
  118. olinkxml.sh
  119. ora_ref.sh
  120. ora_sync.sh
  121. oracleidx.sh
  122. oraclelink.sh
  123. p4_backup.sh
  124. p4_changes.sh
  125. p4_checkpoint.sh
  126. p4_state.sh
  127. packagelink.sh
  128. pflag.sh
  129. pm_sync.sh
  130. pmlink.sh
  131. qa_sync.sh
  132. qalink.sh
  133. rb.sql
  134. redo.sql
  135. refset.sh
  136. reject.sh
  137. reject1.sh
  138. removelink.sh
  139. rename.sh
  140. replace.sh
  141. replacea.sh
  142. replaceaslash.sh
  143. replacecgi.sh
  144. replacelink.sh
  145. replacephp.sh
  146. replacesh.sh
  147. replaceslash.sh
  148. sandvold.sh
  149. schema.sh
  150. skyway.sh
  151. skyway1.sh
  152. skyway2.sh
  153. Specs Script
  154. sqldate.sh
  155. sqldate.sh
  156. startsmb.sh
  157. state.sh
  158. sum_dba.sql
  159. support_sync.sh
  160. tabletag.sh
  161. tbl_link.sh
  162. tblurl
  163. titletag.sh
  164. treeidx.sh
  165. treeidx1.sh
  166. update.sh
  167. useradd.sh
  168. viala.sh
  169. viald.sh
  170. vialsh.sh
  171. vialx.sh
  172. wendy.sh
  173. whatsnew.sh
  174. wkdemenu.pl
  175. women.sh
  176. xmlsplit.pl
  177. zzz.sh

 

 


Home