home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / ut-doc.lbr / UTOOL.DZC / UTOOL.DOC
Encoding:
Text File  |  1993-10-25  |  6.1 KB  |  152 lines

  1.                          WTW Associates
  2.                         341 N. First St.
  3.                        Campbell, Ca. 95008
  4.  
  5. Documentation for the UTOOLS  (utool.doc 2/23/83)
  6. (author of both tools and documentation: David H. Wolen)
  7.  
  8. Mos⌠á oµá thσ UTOOL╙ arσ deriveΣ froφ thσ program≤á describeΣá iε ì
  9. Softwarσá Tool≤ anΣ Softwarσ Tool≤ iε Pasca∞ (botΦá b∙á Kernighaε ì
  10. anΣ Plauger)«  The∙ werσ writteε iε ├  anΣ testeΣ oε aε Osbornσ ▒ ì
  11. (Z80A¼á CP/═ 2.2¼á singlσ density)«á  Thσ UTOOL╙ providσ feature≤ ì
  12. calleΣá I/╧ redirectioε anΣ pipes«á  Externally¼á thesσá feature≤ ì
  13. resemblσá thosσ provideΣ unde≥ thσ UNI╪ operatinτ systeφ -- hencσ ì
  14. thσ namσ UTOOLS«  Thσ manua∞ pagσ fo≥ eacΦ UTOO╠ describe≤ allow ì
  15. ablσ inpu⌠ anΣ output«á  Iµ thσ inpu⌠ i≤ STDIN¼á tha⌠ mean≤ inpu⌠ ì
  16. caεá comσá froφ thσ keyboarΣ o≥ froφ ß file«á  Iµ thσá outpu⌠á i≤ ì
  17. STDOUT¼á tha⌠ mean≤ thσ outpu⌠ caε g∩ t∩ thσ screen¼ ß file¼ botΦ ì
  18. screeε anΣ file¼ o≥ servσ a≤ inpu⌠ t∩ anothe≥ UTOOL«  Thσ followì
  19. inτ example≤ assumσ tha⌠ thσ UTOOL╙ arσ oε thσ ┴ drive¼á an∙ filσ ì
  20. t∩ bσ reaΣ o≥ writteε wil∞ bσ oε thσ ┬ drive¼ anΣ ┬ i≤ thσ loggeΣ ì
  21. drive«á  It'≤ bes⌠ t∩ makσ ┬ thσ loggeΣ drivσ becausσ thσá UTOOL╙ ì
  22. sometime≤ havσ t∩ makσ anΣ releasσ ß temporar∙ filσ oε thσ loggeΣ ì
  23. drive«  Therσ probabl∙ isn'⌠ enougΦ rooφ oε ┴ fo≥ that.
  24.  
  25. Examples of I/O redirection and piping:
  26.  
  27. 1«á  KeyboarΣ inpu⌠ anΣ screeε outpu⌠ (usefu∞ fo≥ learninτ ho≈á ß ì
  28. UTOOL works).
  29.  
  30.      B>a:cat
  31.  
  32. áááááca⌠á wil∞á wait fo≥ yo⌡ t∩ typσ iε datß anΣ wil∞ ech∩ i⌠á t∩ ì
  33. áááááthσ screeε afte≥ yo⌡ typσ eacΦ line«á  EnΣ eacΦ linσ witΦá ß ì
  34. ááááá<cr╛ (carriagσ return)«  Iµ yo⌡ makσ ß mistakσ whilσ typing¼ ì
  35. áááááyo⌡ caε usσ ^Φ (contro∞ h⌐ t∩ erasσ thσ las⌠ characte≥ typeΣ ì
  36. áááááo≥á ^°á (contro∞ x⌐ t∩ erasσ thσ wholσá line«á  Wheεá you'rσ ì
  37. ááááátireΣá oµá typing¼á ente≥á ^z<cr╛ (contro∞ · followeΣá b∙á ß ì
  38. ááááácarriage return) to tell cat that you're done.
  39.  
  40. 2«á  KeyboarΣ inpu⌠ anΣ filσ output«  Thi≤ i≤ usefu∞ fo≥ creatinτ ì
  41. ß filσ quickl∙ withou⌠ botherinτ witΦ ß tex⌠ editor«á  I⌠ create≤ ì
  42. ß norma∞ asciΘ file«  Note║ n∩ spacσ i≤ alloweΣ betweeε thσ ╛ anΣ ì
  43. thσá filσá name«á  Iµ thσ filσ alread∙ exists¼á i⌠ wil∞á bσá ove≥ ì
  44. written.
  45.  
  46.      B>a:cat >outfile
  47.  
  48. 3«  KeyboarΣ input«  Outpu⌠ t∩ botΦ thσ screeε anΣ ß file«  Note║ ì
  49. no space between the + and the file name.
  50.  
  51.      B>a:cat +outfile
  52. .pa
  53. è4«á  Filσ inpu⌠ anΣ screeε output«á  Again¼ notσ tha⌠ therσ can'⌠ ì
  54. be any space between the < and the file name.
  55.  
  56.      B>a:cat <infile
  57.  
  58. 5«á  KeyboarΣ inpu⌠ anΣ pipσ thσ outpu⌠ t∩ anothe≥ UTOOL«á  Note║ ì
  59. no space between | and the second UTOOL.
  60.  
  61.      B>a:cat |a:lpr
  62.  
  63. áááááThi≤ examplσ woulΣ senΣ thσ line≤ yo⌡ typeΣ a⌠ thσá keyboarΣ ì
  64. áááááto the printer (after you typed the ^z<cr> to finish).
  65.  
  66.  
  67.  
  68. Here are some useful pipelines.
  69.  
  70. 1«á  Makσá ß keyworΣ iε contex⌠ index¼á treatinτ uppe≥ anΣá lowe≥ ì
  71. casσ alphß thσ same«á  Displa∙ oε thσ screen¼á pausinτ afte≥ eacΦ ì
  72. screen full.  Input is a normal ascii file.
  73.  
  74.      B>a:kwic <infile |a:sort -f |a:unrot |a:crt
  75.  
  76. 2«á  WorΣ frequenc∙ count¼á sorteΣ b∙ word«á  Inpu⌠ i≤ ß WordSta≥ ì
  77. doc file.  Convert all words to lower case.
  78.  
  79.      B>a:prep <infile.doc |a:sort |a:uniq -c
  80.  
  81. 3«á  WorΣ frequenc∙ count¼ numerica∞ order¼ larges⌠ first«  Inpu⌠ ì
  82. is a WordStar doc file.  Convert all words to lower case.
  83.  
  84.      B>a:prep <infile.doc |a:sort |a:uniq -c |a:sort -nr
  85.  
  86. 4«  Combinσ │ datß file≤ (norma∞ ascii)¼ sor⌠ theφ treatinτ uppe≥ ì
  87. anΣ lowe≥ casσ alphß thσ same¼ deletσ duplicatσ line≤ anΣ print.
  88.  
  89.      B>a:cat file1.dat file2.dat file3.dat |a:sort -fu |a:lpr
  90.  
  91. 5«á  SorteΣá lis⌠ oµ al∞ word≤ iε ß WordSta≥ doπ file«á  Onσ worΣ ì
  92. pe≥ line«á  DistinguisΦ betweeε uppe≥ anΣ lowe≥ casσ alpha«  Sho≈ ì
  93. only one occurrence of each word.
  94.  
  95.      B>a:cat <infile.doc -w |a:tr " \n\t" \n |a:sort -u
  96.  
  97.  
  98.  
  99. Notes:
  100.  
  101. a«á  Thσá UTOOL╙ werσ writteε usinτ thσ BD╙ ├á compiler¼á versioε ì
  102. 1.46, and the dio function package that came with it.
  103.  
  104. b«á  Pipσ mechanisφ (whicΦ reall∙ use≤ temporar∙ files⌐ wil∞ worδ ì
  105. onl∙ witΦ UTOOL╙ o≥ othe≥ program≤ writteε iε BD╙ ├ anΣ usinτ thσ ì
  106. dio package.
  107.  
  108. èc«á  Thσá UTOOL╙ al∞ worδ oε norma∞ asciΘ tex⌠ file≤ (non-doπá iε ì
  109. WordSta≥á terminology)«á  Somσ als∩ worδ oε WordSta≥á doπá files«  ì
  110. See the manual pages to find out which do and which do not.
  111.  
  112. d«á  Don'⌠á tr∙ t∩ chaiε to∩ man∙ UTOOL╙ togethe≥ iε ßá pipeline«  ì
  113. Also¼á finΣá anΣ cΦ don'⌠ seeφ t∩ ge⌠ alonτ wel∞ togethe≥ iεá thσ ì
  114. same pipeline.
  115.  
  116. e«á  Don'⌠á tr∙ t∩ creatσ ß filσ oε ß nearl∙ ful∞ disk«á  I⌠ wil∞ ì
  117. probably truncate at the end without warning you.
  118.  
  119. f«á  Iµ you≥ systeφ crashe≤ o≥ yo⌡ hi⌠ rese⌠ iε thσ middlσ oµá aε ì
  120. execution¼á yo⌡ ma∙ finΣ thσ file≤ tempin.$$ñ o≥ tempout.$$ñ wheε ì
  121. yo⌡ comσ bacδ up«á  Thσ UTOOL╙ ge⌠ riΣ oµ theφ wheε the∙ completσ ì
  122. normally«á  Sincσ the∙ didn'⌠ iε thi≤ case¼á you'l∞ havσ t∩ erasσ ì
  123. them yourself.
  124.  
  125. g«á  Thσá manua∞ pagσ fo≥ somσ oµ thσ UTOOL╙ show≤ somethinτ likσ ì
  126. proτá [-xyz]«á  Thσ bracket≤ indicatσ optiona∞á argument≤á -- yo⌡ ì
  127. don't actually type them in.
  128.  
  129. h«á  N∩á leadinτ spacσ i≤ alloweΣ betweeε thσ CP/═ B╛ promp⌠á anΣ ì
  130. the UTOOL name.
  131.  
  132. i«  Iµ ß UTOO╠ take≤ multiplσ option≤ (e.g« a¼ b¼ anΣ c⌐ the∙ caε ì
  133. be given either as -a -b -c or -abc.
  134.  
  135. j«á  Option≤á anΣá redirecteΣ inpu⌠ anΣ outpu⌠ caε appea≥ iεá an∙ ì
  136. order.  E.g. all of the following are o.k.
  137.      a:cat -w <infile >outfile
  138.      a:cat <infile -w >outfile
  139.      a:cat <infile >outfile -w
  140.  
  141. k«  Wherσ ß UTOO╠ aε takσ ß regula≥ filσ a≤ inpu⌠ (withou⌠ thσ <⌐ ì
  142. anΣá ha≤ option≤ (-xyz)¼á consul⌠ thσ manua∞ pagσ t∩ seσá whethe≥ ì
  143. thσá option≤á mus⌠ bσ giveε beforσ o≥ afte≥ thσ filσá name«á  Thσ ì
  144. optioεá usuall∙á preceed≤ thσ filσ namσ bu⌠á ╔á wasn'⌠á perfectl∙ ì
  145. consistent.  E.g.
  146.      a:cal file -g 01/01/83        (option follows file name)
  147.      a:cat -w file                 (option preceeds file name)
  148.      a:comm -12 file               (option preceeds file name)
  149.      a:crt -n file                 (option preceeds file name)
  150.  
  151. l«  Thσ followinτ arσ registereΣ trademarks║ Osbornσ ▒ b∙ Osbornσ ì
  152. Computer¼á CP/═ b∙ Digita∞ Research¼á Z80┴ b∙ Zilog¼ UNI╪ b∙ Bel∞ ì
  153. Labs, WordStar by MicroPro.
  154.