home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / textutils-1.19-bin.lha / info / textutils.info-3 < prev    next >
Encoding:
GNU Info File  |  1996-10-12  |  36.8 KB  |  789 lines

  1. This is Info file textutils.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/fsf/textutils/doc/textutils.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Text utilities: (textutils).          GNU text utilities.
  6. * cat: (textutils)cat invocation.               Concatenate and write files.
  7. * cksum: (textutils)cksum invocation.           Print POSIX CRC checksum.
  8. * comm: (textutils)comm invocation.             Compare sorted files by line.
  9. * csplit: (textutils)csplit invocation.         Split by context.
  10. * cut: (textutils)cut invocation.               Print selected parts of lines.
  11. * expand: (textutils)expand invocation.         Convert tabs to spaces.
  12. * fmt: (textutils)fmt invocation.               Reformat paragraph text.
  13. * fold: (textutils)fold invocation.             Wrap long input lines.
  14. * head: (textutils)head invocation.             Output the first part of files.
  15. * join: (textutils)join invocation.             Join lines on a common field.
  16. * md5sum: (textutils)md5sum invocation.         Print or check message-digests.
  17. * nl: (textutils)nl invocation.                 Number lines and write files.
  18. * od: (textutils)od invocation.                 Dump files in octal, etc.
  19. * paste: (textutils)paste invocation.           Merge lines of files.
  20. * pr: (textutils)pr invocation.                 Paginate or columnate files.
  21. * sort: (textutils)sort invocation.             Sort text files.
  22. * split: (textutils)split invocation.           Split into fixed-size pieces.
  23. * sum: (textutils)sum invocation.               Print traditional checksum.
  24. * tac: (textutils)tac invocation.               Reverse files.
  25. * tail: (textutils)tail invocation.             Output the last part of files.
  26. * tr: (textutils)tr invocation.                 Translate characters.
  27. * unexpand: (textutils)unexpand invocation.     Convert spaces to tabs.
  28. * uniq: (textutils)uniq invocation.             Uniqify files.
  29. * wc: (textutils)wc invocation.                 Byte, word, and line counts.
  30. END-INFO-DIR-ENTRY
  31.  
  32.    This file documents the GNU text utilities.
  33.  
  34.    Copyright (C) 1994, 95, 96 Free Software Foundation, Inc.
  35.  
  36.    Permission is granted to make and distribute verbatim copies of this
  37. manual provided the copyright notice and this permission notice are
  38. preserved on all copies.
  39.  
  40.    Permission is granted to copy and distribute modified versions of
  41. this manual under the conditions for verbatim copying, provided that
  42. the entire resulting derived work is distributed under the terms of a
  43. permission notice identical to this one.
  44.  
  45.    Permission is granted to copy and distribute translations of this
  46. manual into another language, under the above conditions for modified
  47. versions, except that this permission notice may be stated in a
  48. translation approved by the Foundation.
  49.  
  50. 
  51. File: textutils.info,  Node: Putting the tools together,  Prev: The `uniq' command,  Up: Opening the software toolbox
  52.  
  53. Putting the tools together
  54. ==========================
  55.  
  56.    Now, let's suppose this is a large BBS system with dozens of users
  57. logged in.  The management wants the SysOp to write a program that will
  58. generate a sorted list of logged in users.  Furthermore, even if a user
  59. is logged in multiple times, his or her name should only show up in the
  60. output once.
  61.  
  62.    The SysOp could sit down with the system documentation and write a C
  63. program that did this. It would take perhaps a couple of hundred lines
  64. of code and about two hours to write it, test it, and debug it.
  65. However, knowing the software toolbox, the SysOp can instead start out
  66. by generating just a list of logged on users:
  67.  
  68.      $ who | cut -c1-8
  69.      arnold
  70.      miriam
  71.      bill
  72.      arnold
  73.  
  74.    Next, sort the list:
  75.  
  76.      $ who | cut -c1-8 | sort
  77.      arnold
  78.      arnold
  79.      bill
  80.      miriam
  81.  
  82.    Finally, run the sorted list through `uniq', to weed out duplicates:
  83.  
  84.      $ who | cut -c1-8 | sort | uniq
  85.      arnold
  86.      bill
  87.      miriam
  88.  
  89.    The `sort' command actually has a `-u' option that does what `uniq'
  90. does. However, `uniq' has other uses for which one cannot substitute
  91. `sort -u'.
  92.  
  93.    The SysOp puts this pipeline into a shell script, and makes it
  94. available for all the users on the system:
  95.  
  96.      # cat > /usr/local/bin/listusers
  97.      who | cut -c1-8 | sort | uniq
  98.      ^D
  99.      # chmod +x /usr/local/bin/listusers
  100.  
  101.    There are four major points to note here.  First, with just four
  102. programs, on one command line, the SysOp was able to save about two
  103. hours worth of work.  Furthermore, the shell pipeline is just about as
  104. efficient as the C program would be, and it is much more efficient in
  105. terms of programmer time.  People time is much more expensive than
  106. computer time, and in our modern "there's never enough time to do
  107. everything" society, saving two hours of programmer time is no mean
  108. feat.
  109.  
  110.    Second, it is also important to emphasize that with the
  111. *combination* of the tools, it is possible to do a special purpose job
  112. never imagined by the authors of the individual programs.
  113.  
  114.    Third, it is also valuable to build up your pipeline in stages, as
  115. we did here.  This allows you to view the data at each stage in the
  116. pipeline, which helps you acquire the confidence that you are indeed
  117. using these tools correctly.
  118.  
  119.    Finally, by bundling the pipeline in a shell script, other users can
  120. use your command, without having to remember the fancy plumbing you set
  121. up for them. In terms of how you run them, shell scripts and compiled
  122. programs are indistinguishable.
  123.  
  124.    After the previous warm-up exercise, we'll look at two additional,
  125. more complicated pipelines.  For them, we need to introduce two more
  126. tools.
  127.  
  128.    The first is the `tr' command, which stands for "transliterate." The
  129. `tr' command works on a character-by-character basis, changing
  130. characters. Normally it is used for things like mapping upper case to
  131. lower case:
  132.  
  133.      $ echo ThIs ExAmPlE HaS MIXED case! | tr '[A-Z]' '[a-z]'
  134.      this example has mixed case!
  135.  
  136.    There are several options of interest:
  137.  
  138. `-c'
  139.      work on the complement of the listed characters, i.e., operations
  140.      apply to characters not in the given set
  141.  
  142. `-d'
  143.      delete characters in the first set from the output
  144.  
  145. `-s'
  146.      squeeze repeated characters in the output into just one character.
  147.  
  148.    We will be using all three options in a moment.
  149.  
  150.    The other command we'll look at is `comm'.  The `comm' command takes
  151. two sorted input files as input data, and prints out the files' lines
  152. in three columns.  The output columns are the data lines unique to the
  153. first file, the data lines unique to the second file, and the data
  154. lines that are common to both.  The `-1', `-2', and `-3' command line
  155. options omit the respective columns. (This is non-intuitive and takes a
  156. little getting used to.)  For example:
  157.  
  158.      $ cat f1
  159.      11111
  160.      22222
  161.      33333
  162.      44444
  163.      $ cat f2
  164.      00000
  165.      22222
  166.      33333
  167.      55555
  168.      $ comm f1 f2
  169.              00000
  170.      11111
  171.                      22222
  172.                      33333
  173.      44444
  174.              55555
  175.  
  176.    The single dash as a filename tells `comm' to read standard input
  177. instead of a regular file.
  178.  
  179.    Now we're ready to build a fancy pipeline.  The first application is
  180. a word frequency counter.  This helps an author determine if he or she
  181. is over-using certain words.
  182.  
  183.    The first step is to change the case of all the letters in our input
  184. file to one case.  "The" and "the" are the same word when doing
  185. counting.
  186.  
  187.      $ tr '[A-Z]' '[a-z]' < whats.gnu | ...
  188.  
  189.    The next step is to get rid of punctuation.  Quoted words and
  190. unquoted words should be treated identically; it's easiest to just get
  191. the punctuation out of the way.
  192.  
  193.      $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | ...
  194.  
  195.    The second `tr' command operates on the complement of the listed
  196. characters, which are all the letters, the digits, the underscore, and
  197. the blank.  The `\012' represents the newline character; it has to be
  198. left alone.  (The ASCII TAB character should also be included for good
  199. measure in a production script.)
  200.  
  201.    At this point, we have data consisting of words separated by blank
  202. space.  The words only contain alphanumeric characters (and the
  203. underscore).  The next step is break the data apart so that we have one
  204. word per line. This makes the counting operation much easier, as we
  205. will see shortly.
  206.  
  207.      $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' |
  208.      > tr -s '[ ]' '\012' | ...
  209.  
  210.    This command turns blanks into newlines.  The `-s' option squeezes
  211. multiple newline characters in the output into just one.  This helps us
  212. avoid blank lines. (The `>' is the shell's "secondary prompt." This is
  213. what the shell prints when it notices you haven't finished typing in
  214. all of a command.)
  215.  
  216.    We now have data consisting of one word per line, no punctuation,
  217. all one case.  We're ready to count each word:
  218.  
  219.      $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' |
  220.      > tr -s '[ ]' '\012' | sort | uniq -c | ...
  221.  
  222.    At this point, the data might look something like this:
  223.  
  224.        60 a
  225.         2 able
  226.         6 about
  227.         1 above
  228.         2 accomplish
  229.         1 acquire
  230.         1 actually
  231.         2 additional
  232.  
  233.    The output is sorted by word, not by count!  What we want is the most
  234. frequently used words first.  Fortunately, this is easy to accomplish,
  235. with the help of two more `sort' options:
  236.  
  237. `-n'
  238.      do a numeric sort, not an ASCII one
  239.  
  240. `-r'
  241.      reverse the order of the sort
  242.  
  243.    The final pipeline looks like this:
  244.  
  245.      $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' |
  246.      > tr -s '[ ]' '\012' | sort | uniq -c | sort -nr
  247.       156 the
  248.        60 a
  249.        58 to
  250.        51 of
  251.        51 and
  252.       ...
  253.  
  254.    Whew!  That's a lot to digest.  Yet, the same principles apply. With
  255. six commands, on two lines (really one long one split for convenience),
  256. we've created a program that does something interesting and useful, in
  257. much less time than we could have written a C program to do the same
  258. thing.
  259.  
  260.    A minor modification to the above pipeline can give us a simple
  261. spelling checker!  To determine if you've spelled a word correctly, all
  262. you have to do is look it up in a dictionary.  If it is not there, then
  263. chances are that your spelling is incorrect.  So, we need a dictionary.
  264. If you have the Slackware Linux distribution, you have the file
  265. `/usr/lib/ispell/ispell.words', which is a sorted, 38,400 word
  266. dictionary.
  267.  
  268.    Now, how to compare our file with the dictionary?  As before, we
  269. generate a sorted list of words, one per line:
  270.  
  271.      $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' |
  272.      > tr -s '[ ]' '\012' | sort -u | ...
  273.  
  274.    Now, all we need is a list of words that are *not* in the
  275. dictionary.  Here is where the `comm' command comes in.
  276.  
  277.      $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' |
  278.      > tr -s '[ ]' '\012' | sort -u |
  279.      > comm -23 - /usr/lib/ispell/ispell.words
  280.  
  281.    The `-2' and `-3' options eliminate lines that are only in the
  282. dictionary (the second file), and lines that are in both files.  Lines
  283. only in the first file (standard input, our stream of words), are words
  284. that are not in the dictionary.  These are likely candidates for
  285. spelling errors.  This pipeline was the first cut at a production
  286. spelling checker on Unix.
  287.  
  288.    There are some other tools that deserve brief mention.
  289.  
  290. `grep'
  291.      search files for text that matches a regular expression
  292.  
  293. `egrep'
  294.      like `grep', but with more powerful regular expressions
  295.  
  296. `wc'
  297.      count lines, words, characters
  298.  
  299. `tee'
  300.      a T-fitting for data pipes, copies data to files and to standard
  301.      output
  302.  
  303. `sed'
  304.      the stream editor, an advanced tool
  305.  
  306. `awk'
  307.      a data manipulation language, another advanced tool
  308.  
  309.    The software tools philosophy also espoused the following bit of
  310. advice: "Let someone else do the hard part." This means, take something
  311. that gives you most of what you need, and then massage it the rest of
  312. the way until it's in the form that you want.
  313.  
  314.    To summarize:
  315.  
  316.   1. Each program should do one thing well. No more, no less.
  317.  
  318.   2. Combining programs with appropriate plumbing leads to results where
  319.      the whole is greater than the sum of the parts.  It also leads to
  320.      novel uses of programs that the authors might never have imagined.
  321.  
  322.   3. Programs should never print extraneous header or trailer data,
  323.      since these could get sent on down a pipeline. (A point we didn't
  324.      mention earlier.)
  325.  
  326.   4. Let someone else do the hard part.
  327.  
  328.   5. Know your toolbox! Use each program appropriately. If you don't
  329.      have an appropriate tool, build one.
  330.  
  331.    As of this writing, all the programs we've discussed are available
  332. via anonymous `ftp' from `prep.ai.mit.edu' as
  333. `/pub/gnu/textutils-1.9.tar.gz' directory.(1)
  334.  
  335.    None of what I have presented in this column is new. The Software
  336. Tools philosophy was first introduced in the book `Software Tools', by
  337. Brian Kernighan and P.J. Plauger (Addison-Wesley, ISBN 0-201-03669-X).
  338. This book showed how to write and use software tools.   It was written
  339. in 1976, using a preprocessor for FORTRAN named `ratfor' (RATional
  340. FORtran).  At the time, C was not as ubiquitous as it is now; FORTRAN
  341. was.  The last chapter presented a `ratfor' to FORTRAN processor,
  342. written in `ratfor'. `ratfor' looks an awful lot like C; if you know C,
  343. you won't have any problem following the code.
  344.  
  345.    In 1981, the book was updated and made available as `Software Tools
  346. in Pascal' (Addison-Wesley, ISBN 0-201-10342-7).  Both books remain in
  347. print, and are well worth reading if you're a programmer.  They
  348. certainly made a major change in how I view programming.
  349.  
  350.    Initially, the programs in both books were available (on 9-track
  351. tape) from Addison-Wesley.  Unfortunately, this is no longer the case,
  352. although you might be able to find copies floating around the Internet.
  353. For a number of years, there was an active Software Tools Users Group,
  354. whose members had ported the original `ratfor' programs to essentially
  355. every computer system with a FORTRAN compiler.  The popularity of the
  356. group waned in the middle '80s as Unix began to spread beyond
  357. universities.
  358.  
  359.    With the current proliferation of GNU code and other clones of Unix
  360. programs, these programs now receive little attention; modern C
  361. versions are much more efficient and do more than these programs do.
  362. Nevertheless, as exposition of good programming style, and evangelism
  363. for a still-valuable philosophy, these books are unparalleled, and I
  364. recommend them highly.
  365.  
  366.    Acknowledgment: I would like to express my gratitude to Brian
  367. Kernighan of Bell Labs, the original Software Toolsmith, for reviewing
  368. this column.
  369.  
  370.    ---------- Footnotes ----------
  371.  
  372.    (1)  Version 1.9 was current when this column was written. Check the
  373. nearest GNU archive for the current version.
  374.  
  375. 
  376. File: textutils.info,  Node: Index,  Prev: Opening the software toolbox,  Up: Top
  377.  
  378. Index
  379. *****
  380.  
  381. * Menu:
  382.  
  383. * +COUNT:                               tail invocation.
  384. * +N:                                   uniq invocation.
  385. * -address-radix:                       od invocation.
  386. * -all:                                 unexpand invocation.
  387. * -before:                              tac invocation.
  388. * -binary:                              md5sum invocation.
  389. * -body-numbering:                      nl invocation.
  390. * -bytes <1>:                           split invocation.
  391. * -bytes <2>:                           head invocation.
  392. * -bytes <3>:                           fold invocation.
  393. * -bytes <4>:                           tail invocation.
  394. * -bytes <5>:                           wc invocation.
  395. * -bytes:                               cut invocation.
  396. * -characters:                          cut invocation.
  397. * -chars:                               wc invocation.
  398. * -check-chars:                         uniq invocation.
  399. * -count:                               uniq invocation.
  400. * -crown-margin:                        fmt invocation.
  401. * -delimiter:                           cut invocation.
  402. * -delimiters:                          paste invocation.
  403. * -digits:                              csplit invocation.
  404. * -elide-empty-files:                   csplit invocation.
  405. * -fields:                              cut invocation.
  406. * -follow:                              tail invocation.
  407. * -footer-numbering:                    nl invocation.
  408. * -format:                              od invocation.
  409. * -header-numbering:                    nl invocation.
  410. * -help:                                Common options.
  411. * -ignore-case <1>:                     uniq invocation.
  412. * -ignore-case:                         join invocation.
  413. * -initial:                             expand invocation.
  414. * -join-blank-lines:                    nl invocation.
  415. * -keep-files:                          csplit invocation.
  416. * -line-bytes:                          split invocation.
  417. * -lines <1>:                           split invocation.
  418. * -lines <2>:                           head invocation.
  419. * -lines <3>:                           tail invocation.
  420. * -lines:                               wc invocation.
  421. * -no-renumber:                         nl invocation.
  422. * -number:                              cat invocation.
  423. * -number-format:                       nl invocation.
  424. * -number-nonblank:                     cat invocation.
  425. * -number-separator:                    nl invocation.
  426. * -number-width:                        nl invocation.
  427. * -only-delimited:                      cut invocation.
  428. * -output-duplicates:                   od invocation.
  429. * -page-increment:                      nl invocation.
  430. * -prefix:                              csplit invocation.
  431. * -quiet <1>:                           tail invocation.
  432. * -quiet <2>:                           head invocation.
  433. * -quiet:                               csplit invocation.
  434. * -read-bytes:                          od invocation.
  435. * -regex:                               tac invocation.
  436. * -repeated:                            uniq invocation.
  437. * -section-delimiter:                   nl invocation.
  438. * -separator:                           tac invocation.
  439. * -serial:                              paste invocation.
  440. * -show-all:                            cat invocation.
  441. * -show-ends:                           cat invocation.
  442. * -show-nonprinting:                    cat invocation.
  443. * -show-tabs:                           cat invocation.
  444. * -silent <1>:                          tail invocation.
  445. * -silent <2>:                          head invocation.
  446. * -silent:                              csplit invocation.
  447. * -skip-bytes:                          od invocation.
  448. * -skip-chars:                          uniq invocation.
  449. * -skip-fields:                         uniq invocation.
  450. * -spaces:                              fold invocation.
  451. * -split-only:                          fmt invocation.
  452. * -squeeze-blank:                       cat invocation.
  453. * -starting-line-number:                nl invocation.
  454. * -status:                              md5sum invocation.
  455. * -string:                              md5sum invocation.
  456. * -strings:                             od invocation.
  457. * -suffix:                              csplit invocation.
  458. * -sysv:                                sum invocation.
  459. * -tabs <1>:                            unexpand invocation.
  460. * -tabs:                                expand invocation.
  461. * -tagged-paragraph:                    fmt invocation.
  462. * -text:                                md5sum invocation.
  463. * -traditional:                         od invocation.
  464. * -uniform-spacing:                     fmt invocation.
  465. * -unique:                              uniq invocation.
  466. * -verbose <1>:                         tail invocation.
  467. * -verbose <2>:                         head invocation.
  468. * -verbose:                             split invocation.
  469. * -version:                             Common options.
  470. * -warn:                                md5sum invocation.
  471. * -width <1>:                           od invocation.
  472. * -width <2>:                           fmt invocation.
  473. * -width:                               fold invocation.
  474. * -words:                               wc invocation.
  475. * -1 <1>:                               join invocation.
  476. * -1:                                   comm invocation.
  477. * -2 <1>:                               comm invocation.
  478. * -2:                                   join invocation.
  479. * -3:                                   comm invocation.
  480. * -COLUMN:                              pr invocation.
  481. * -COUNT <1>:                           head invocation.
  482. * -COUNT:                               tail invocation.
  483. * -N:                                   uniq invocation.
  484. * -TAB <1>:                             unexpand invocation.
  485. * -TAB:                                 expand invocation.
  486. * -WIDTH:                               fmt invocation.
  487. * -a <1>:                               unexpand invocation.
  488. * -a:                                   join invocation.
  489. * -A <1>:                               cat invocation.
  490. * -A:                                   od invocation.
  491. * -a <1>:                               pr invocation.
  492. * -a:                                   od invocation.
  493. * -b <1>:                               csplit invocation.
  494. * -b <2>:                               split invocation.
  495. * -b <3>:                               cat invocation.
  496. * -b <4>:                               fold invocation.
  497. * -b <5>:                               cut invocation.
  498. * -b <6>:                               pr invocation.
  499. * -b <7>:                               nl invocation.
  500. * -b <8>:                               md5sum invocation.
  501. * -b <9>:                               tac invocation.
  502. * -b <10>:                              sort invocation.
  503. * -b:                                   od invocation.
  504. * -c <1>:                               fmt invocation.
  505. * -c <2>:                               cut invocation.
  506. * -c <3>:                               od invocation.
  507. * -c <4>:                               pr invocation.
  508. * -c <5>:                               wc invocation.
  509. * -c <6>:                               tail invocation.
  510. * -c:                                   sort invocation.
  511. * -C:                                   split invocation.
  512. * -c <1>:                               head invocation.
  513. * -c:                                   uniq invocation.
  514. * -d <1>:                               nl invocation.
  515. * -d <2>:                               sort invocation.
  516. * -d <3>:                               uniq invocation.
  517. * -d <4>:                               cut invocation.
  518. * -d <5>:                               pr invocation.
  519. * -d <6>:                               paste invocation.
  520. * -d:                                   od invocation.
  521. * -e <1>:                               join invocation.
  522. * -e <2>:                               cat invocation.
  523. * -e:                                   pr invocation.
  524. * -E:                                   cat invocation.
  525. * -f <1>:                               cut invocation.
  526. * -f <2>:                               csplit invocation.
  527. * -f <3>:                               pr invocation.
  528. * -f:                                   uniq invocation.
  529. * -F:                                   pr invocation.
  530. * -f <1>:                               nl invocation.
  531. * -f <2>:                               tail invocation.
  532. * -f <3>:                               sort invocation.
  533. * -f:                                   od invocation.
  534. * -g:                                   sort invocation.
  535. * -h <1>:                               od invocation.
  536. * -h <2>:                               nl invocation.
  537. * -h:                                   pr invocation.
  538. * -i <1>:                               od invocation.
  539. * -i <2>:                               nl invocation.
  540. * -i <3>:                               sort invocation.
  541. * -i <4>:                               pr invocation.
  542. * -i <5>:                               join invocation.
  543. * -i <6>:                               expand invocation.
  544. * -i:                                   uniq invocation.
  545. * -j:                                   od invocation.
  546. * -j1:                                  join invocation.
  547. * -j2:                                  join invocation.
  548. * -k <1>:                               csplit invocation.
  549. * -k:                                   sort invocation.
  550. * -l <1>:                               od invocation.
  551. * -l <2>:                               split invocation.
  552. * -l <3>:                               nl invocation.
  553. * -l <4>:                               pr invocation.
  554. * -l:                                   wc invocation.
  555. * -m <1>:                               sort invocation.
  556. * -m:                                   pr invocation.
  557. * -n <1>:                               sort invocation.
  558. * -n <2>:                               pr invocation.
  559. * -n <3>:                               tail invocation.
  560. * -n <4>:                               head invocation.
  561. * -n:                                   nl invocation.
  562. * -N:                                   od invocation.
  563. * -n <1>:                               csplit invocation.
  564. * -n <2>:                               cat invocation.
  565. * -n:                                   cut invocation.
  566. * -o <1>:                               pr invocation.
  567. * -o <2>:                               sort invocation.
  568. * -o:                                   od invocation.
  569. * -p:                                   nl invocation.
  570. * -q <1>:                               head invocation.
  571. * -q <2>:                               tail invocation.
  572. * -q:                                   csplit invocation.
  573. * -r <1>:                               sort invocation.
  574. * -r <2>:                               tac invocation.
  575. * -r <3>:                               sum invocation.
  576. * -r:                                   pr invocation.
  577. * -s <1>:                               cut invocation.
  578. * -s <2>:                               uniq invocation.
  579. * -s <3>:                               paste invocation.
  580. * -s <4>:                               cat invocation.
  581. * -s <5>:                               csplit invocation.
  582. * -s <6>:                               od invocation.
  583. * -s <7>:                               pr invocation.
  584. * -s <8>:                               fmt invocation.
  585. * -s <9>:                               fold invocation.
  586. * -s <10>:                              sum invocation.
  587. * -s <11>:                              tac invocation.
  588. * -s:                                   nl invocation.
  589. * -T:                                   cat invocation.
  590. * -t <1>:                               pr invocation.
  591. * -t <2>:                               cat invocation.
  592. * -t <3>:                               sort invocation.
  593. * -t <4>:                               md5sum invocation.
  594. * -t <5>:                               expand invocation.
  595. * -t <6>:                               fmt invocation.
  596. * -t <7>:                               od invocation.
  597. * -t:                                   unexpand invocation.
  598. * -u <1>:                               cat invocation.
  599. * -u <2>:                               fmt invocation.
  600. * -u <3>:                               sort invocation.
  601. * -u:                                   uniq invocation.
  602. * -v <1>:                               od invocation.
  603. * -v <2>:                               head invocation.
  604. * -v <3>:                               tail invocation.
  605. * -v <4>:                               cat invocation.
  606. * -v <5>:                               pr invocation.
  607. * -v:                                   nl invocation.
  608. * -w <1>:                               uniq invocation.
  609. * -w <2>:                               wc invocation.
  610. * -w <3>:                               md5sum invocation.
  611. * -w <4>:                               pr invocation.
  612. * -w <5>:                               od invocation.
  613. * -w <6>:                               nl invocation.
  614. * -w <7>:                               fold invocation.
  615. * -w:                                   fmt invocation.
  616. * -x:                                   od invocation.
  617. * -z <1>:                               sort invocation.
  618. * -z:                                   csplit invocation.
  619. * 128-bit checksum:                     md5sum invocation.
  620. * 16-bit checksum:                      sum invocation.
  621. * across columns:                       pr invocation.
  622. * alnum:                                Character sets.
  623. * alpha:                                Character sets.
  624. * ASCII dump of files:                  od invocation.
  625. * backslash escapes:                    Character sets.
  626. * balancing columns:                    pr invocation.
  627. * binary input files:                   md5sum invocation.
  628. * blank:                                Character sets.
  629. * blank lines, numbering:               nl invocation.
  630. * blanks, ignoring leading:             sort invocation.
  631. * body, numbering:                      nl invocation.
  632. * BSD sum:                              sum invocation.
  633. * BSD tail:                             tail invocation.
  634. * bugs, reporting:                      Introduction.
  635. * byte count:                           wc invocation.
  636. * case folding:                         sort invocation.
  637. * cat:                                  cat invocation.
  638. * characters classes:                   Character sets.
  639. * checking for sortedness:              sort invocation.
  640. * checksum, 128-bit:                    md5sum invocation.
  641. * checksum, 16-bit:                     sum invocation.
  642. * cksum:                                cksum invocation.
  643. * cntrl:                                Character sets.
  644. * comm:                                 comm invocation.
  645. * common field, joining on:             join invocation.
  646. * common lines:                         comm invocation.
  647. * common options:                       Common options.
  648. * comparing sorted files:               comm invocation.
  649. * concatenate and write files:          cat invocation.
  650. * context splitting:                    csplit invocation.
  651. * converting tabs to spaces:            expand invocation.
  652. * copying files:                        cat invocation.
  653. * CRC checksum:                         cksum invocation.
  654. * crown margin:                         fmt invocation.
  655. * csplit:                               csplit invocation.
  656. * cut:                                  cut invocation.
  657. * cyclic redundancy check:              cksum invocation.
  658. * deleting characters:                  Squeezing.
  659. * differing lines:                      comm invocation.
  660. * digit:                                Character sets.
  661. * double spacing:                       pr invocation.
  662. * duplicate lines, outputting:          uniq invocation.
  663. * empty lines, numbering:               nl invocation.
  664. * entire files, output of:              Output of entire files.
  665. * equivalence classes:                  Character sets.
  666. * expand:                               expand invocation.
  667. * field separator character:            sort invocation.
  668. * file contents, dumping unambiguously: od invocation.
  669. * file offset radix:                    od invocation.
  670. * fingerprint, 128-bit:                 md5sum invocation.
  671. * first part of files, outputting:      head invocation.
  672. * fmt:                                  fmt invocation.
  673. * fold:                                 fold invocation.
  674. * folding long input lines:             fold invocation.
  675. * footers, numbering:                   nl invocation.
  676. * formatting file contents:             Formatting file contents.
  677. * general numeric sort:                 sort invocation.
  678. * graph:                                Character sets.
  679. * growing files:                        tail invocation.
  680. * head:                                 head invocation.
  681. * headers, numbering:                   nl invocation.
  682. * help, online:                         Common options.
  683. * hex dump of files:                    od invocation.
  684. * indenting lines:                      pr invocation.
  685. * initial part of files, outputting:    head invocation.
  686. * initial tabs, converting:             expand invocation.
  687. * input tabs:                           pr invocation.
  688. * introduction:                         Introduction.
  689. * join:                                 join invocation.
  690. * Knuth, Donald E.:                     fmt invocation.
  691. * last part of files, outputting:       tail invocation.
  692. * left margin:                          pr invocation.
  693. * line count:                           wc invocation.
  694. * line numbering:                       nl invocation.
  695. * line-breaking:                        fmt invocation.
  696. * line-by-line comparison:              comm invocation.
  697. * ln format for nl:                     nl invocation.
  698. * logical pages, numbering on:          nl invocation.
  699. * lower:                                Character sets.
  700. * md5sum:                               md5sum invocation.
  701. * merging files:                        paste invocation.
  702. * merging sorted files:                 sort invocation.
  703. * message-digest, 128-bit:              md5sum invocation.
  704. * months, sorting by:                   sort invocation.
  705. * multicolumn output, generating:       pr invocation.
  706. * nl:                                   nl invocation.
  707. * numbering lines:                      nl invocation.
  708. * numeric sort:                         sort invocation.
  709. * octal dump of files:                  od invocation.
  710. * od:                                   od invocation.
  711. * operating on characters:              Operating on characters.
  712. * operating on sorted files:            Operating on sorted files.
  713. * output file name prefix <1>:          split invocation.
  714. * output file name prefix:              csplit invocation.
  715. * output file name suffix:              csplit invocation.
  716. * output of entire files:               Output of entire files.
  717. * output of parts of files:             Output of parts of files.
  718. * output tabs:                          pr invocation.
  719. * overwriting of input, allowed:        sort invocation.
  720. * paragraphs, reformatting:             fmt invocation.
  721. * parts of files, output of:            Output of parts of files.
  722. * paste:                                paste invocation.
  723. * phone directory order:                sort invocation.
  724. * pieces, splitting a file into:        split invocation.
  725. * Plass, Michael F.:                    fmt invocation.
  726. * POSIX.2:                              Introduction.
  727. * POSIXLY_CORRECT:                      Warnings in tr.
  728. * pr:                                   pr invocation.
  729. * print:                                Character sets.
  730. * printing, preparing files for:        pr invocation.
  731. * punct:                                Character sets.
  732. * radix for file offsets:               od invocation.
  733. * ranges:                               Character sets.
  734. * reformatting paragraph text:          fmt invocation.
  735. * repeated characters:                  Character sets.
  736. * reverse sorting:                      sort invocation.
  737. * reversing files:                      tac invocation.
  738. * rn format for nl:                     nl invocation.
  739. * rz format for nl:                     nl invocation.
  740. * screen columns:                       fold invocation.
  741. * section delimiters of pages:          nl invocation.
  742. * sentences and line-breaking:          fmt invocation.
  743. * sort:                                 sort invocation.
  744. * sort field:                           sort invocation.
  745. * sort zero-terminated lines:           sort invocation.
  746. * sorted files, operations on:          Operating on sorted files.
  747. * sorting files:                        sort invocation.
  748. * space:                                Character sets.
  749. * specifying sets of characters:        Character sets.
  750. * split:                                split invocation.
  751. * splitting a file into pieces:         split invocation.
  752. * splitting a file into pieces by context: csplit invocation.
  753. * squeezing blank lines:                cat invocation.
  754. * squeezing repeat characters:          Squeezing.
  755. * string constants, outputting:         od invocation.
  756. * sum:                                  sum invocation.
  757. * summarizing files:                    Summarizing files.
  758. * System V sum:                         sum invocation.
  759. * tabs to spaces, converting:           expand invocation.
  760. * tabstops, setting:                    expand invocation.
  761. * tac:                                  tac invocation.
  762. * tagged paragraphs:                    fmt invocation.
  763. * tail:                                 tail invocation.
  764. * telephone directory order:            sort invocation.
  765. * text input files:                     md5sum invocation.
  766. * text utilities:                       Top.
  767. * text, reformatting:                   fmt invocation.
  768. * TMPDIR:                               sort invocation.
  769. * total counts:                         wc invocation.
  770. * tr:                                   tr invocation.
  771. * translating characters:               Translating.
  772. * type size:                            od invocation.
  773. * unexpand:                             unexpand invocation.
  774. * uniq:                                 uniq invocation.
  775. * uniqify files:                        uniq invocation.
  776. * uniqifying output:                    sort invocation.
  777. * unique lines, outputting:             uniq invocation.
  778. * unprintable characters, ignoring:     sort invocation.
  779. * upper:                                Character sets.
  780. * utilities for text handling:          Top.
  781. * verifying MD5 checksums:              md5sum invocation.
  782. * version number, finding:              Common options.
  783. * wc:                                   wc invocation.
  784. * word count:                           wc invocation.
  785. * wrapping long input lines:            fold invocation.
  786. * xdigit:                               Character sets.
  787.  
  788.  
  789.