(usage): Include one- or two-line synopsis in --help output.
authorJim Meyering <jim@meyering.net>
Sat, 13 May 1995 18:34:54 +0000 (18:34 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 13 May 1995 18:34:54 +0000 (18:34 +0000)
From Karl Berry.

23 files changed:
src/cat.c
src/cksum.c
src/comm.c
src/csplit.c
src/cut.c
src/expand.c
src/fmt.c
src/fold.c
src/head.c
src/join.c
src/nl.c
src/od.c
src/paste.c
src/pr.c
src/sort.c
src/split.c
src/sum.c
src/tac.c
src/tail.c
src/tr.c
src/unexpand.c
src/uniq.c
src/wc.c

index 764778f..8c250fc 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -91,6 +91,7 @@ Usage: %s [OPTION] [FILE]...\n\
 ",
              program_name);
       printf ("\
+Concatenate FILE(s), or standard input, to standard output.\n\
 \n\
   -b, --number-nonblank    number nonblank output lines\n\
   -e                       equivalent to -vE\n\
index 28b58e1..9b1e79e 100644 (file)
@@ -274,6 +274,7 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Print CRC checksum and byte counts of each FILE.\n\
 \n\
   --help      display this help and exit\n\
   --version   output version information and exit\n\
index 1df70a5..ad980d7 100644 (file)
@@ -255,6 +255,7 @@ Usage: %s [OPTION]... LEFT_FILE RIGHT_FILE\n\
 ",
              program_name);
       printf ("\
+Compare sorted files LEFT_FILE and RIGHT_FILE line by line.\n\
 \n\
   -1              suppress lines unique to left file\n\
   -2              suppress lines unique to right file\n\
index dedbec8..cf1257d 100644 (file)
@@ -1564,6 +1564,8 @@ Usage: %s [OPTION]... FILE PATTERN...\n\
 ",
              program_name);
       printf ("\
+Output pieces of FILE separated by PATTERN(s) to files `xx01', `xx02', ...,\n\
+and output byte counts of each piece to standard output.\n\
 \n\
   -b, --suffix-format=FORMAT use sprintf FORMAT instead of %%d\n\
   -f, --prefix=PREFIX        use PREFIX instead of `xx'\n\
index 132373a..cd103d3 100644 (file)
--- a/src/cut.c
+++ b/src/cut.c
@@ -201,6 +201,7 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Print selected parts of lines from each FILE to standard output.\n\
 \n\
   -b, --bytes=LIST        output only these bytes\n\
   -c, --characters=LIST   output only these characters\n\
index 2488711..d7366a2 100644 (file)
@@ -398,6 +398,8 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Convert tabs in each FILE to spaces, writing to standard output.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -i, --initial       do not convert TABs after non whitespace\n\
   -t, --tabs=NUMBER   have tabs NUMBER characters apart, not 8\n\
@@ -405,8 +407,7 @@ Usage: %s [OPTION]... [FILE]...\n\
       --help          display this help and exit\n\
       --version       output version information and exit\n\
 \n\
-Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.  With\n\
-no FILE, or when FILE is -, read standard input.\n\
+Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.\n\
 ");
     }
   exit (status);
index 506d1cc..1d15651 100644 (file)
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -274,8 +274,10 @@ usage (status)
     {
       printf ("Usage: %s [-DIGITS] [OPTION]... [FILE]...\n", program_name);
       fputs ("\
-Mandatory arguments to long options are mandatory for short options too.\n\
+Reformat each paragraph in the FILE(s), writing to standard output.\n\
+If no FILE or if FILE is `-', standard input is read.\n\
 \n\
+Mandatory arguments to long options are mandatory for short options too.\n\
   -c, --crown-margin        preserve indentation of first two lines\n\
   -s, --split-only          split long lines, but do not refill\n\
   -t, --tagged-paragraph    indentation of first line different from second\n\
@@ -285,8 +287,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       --help                display this help and exit\n\
       --version             output version information and exit\n\
 \n\
-In -wNUMBER, the letter `w' may be omitted.  Input FILEs are concatenated.\n\
-If no FILE or if FILE is `-', standard input is read.\n",
+In -wNUMBER, the letter `w' may be omitted.\n",
             stdout);
     }
   exit (status);
index 1da75cc..2dfd30f 100644 (file)
@@ -77,6 +77,8 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Wrap input lines in each FILE (standard input by default), writing to\n\
+standard output.\n\
 \n\
   -b, --bytes         count bytes rather than columns\n\
   -s, --spaces        break at word boundaries\n\
index 07c2782..67e0f15 100644 (file)
@@ -386,6 +386,9 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Print first 10 lines of each FILE to standard output.\n\
+With more than one FILE, precede each with a header giving the file name.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -c, --bytes=SIZE         print first SIZE bytes\n\
   -n, --lines=NUMBER   print first NUMBER lines instead of first 10\n\
@@ -396,8 +399,7 @@ Usage: %s [OPTION]... [FILE]...\n\
 \n\
 SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.\n\
 If -VALUE is used as first OPTION, read -c VALUE when one of\n\
-multipliers bkm follows concatenated, else read -n VALUE.  With no\n\
-FILE, or when FILE is -, read standard input.\n\
+multipliers bkm follows concatenated, else read -n VALUE.\n\
 ");
     }
   exit (status);
index 26b855d..3d0320a 100644 (file)
@@ -753,6 +753,9 @@ Usage: %s [OPTION]... FILE1 FILE2\n\
 ",
              program_name);
       printf ("\
+For each pair of input lines with identical join fields, write a line to\n\
+standard output.  The default join field is the first, delimited\n\
+by whitespace.  When FILE1 or FILE2 (not both) is -, read standard input.\n\
 \n\
   -a SIDE          print unpairable lines coming from file SIDE\n\
   -e EMPTY         replace missing input fields with EMPTY\n\
@@ -764,8 +767,7 @@ Usage: %s [OPTION]... FILE1 FILE2\n\
   --help           display this help and exit\n\
   --version        output version information and exit\n\
 \n\
-When FILE1 or FILE2 is -, not both, read standard input.  SIDE is 1\n\
-for FILE1 or 2 for FILE2.  Unless -t CHAR is given, leading blanks\n\
+SIDE is 1 for FILE1 or 2 for FILE2.  Unless -t CHAR is given, leading blanks\n\
 separate fields and are ignored, else fields are separated by CHAR.\n\
 Any FIELD is a field number counted from 1.  FORMAT is one or more\n\
 comma or blank separated specifications, each being `SIDE.FIELD'.\n\
index e7a155a..f9ac3c9 100644 (file)
--- a/src/nl.c
+++ b/src/nl.c
@@ -567,6 +567,8 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Write each FILE to standard output, with line numbers added.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -b, --body-numbering=STYLE      use STYLE for numbering body lines\n\
   -d, --section-delimiter=CC      use CC for separating logical pages\n\
@@ -597,7 +599,6 @@ FORMAT is one of:\n\
   rn   right justified, no leading zeros\n\
   rz   right justified, leading zeros\n\
 \n\
-With no FILE, or when FILE is -, read standard input.\n\
 ");
     }
   exit (status);
index fb9a927..99d9994 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -312,6 +312,8 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name, program_name);
       printf ("\
+Write an unambiguous representation, octal bytes by default, of FILE\n\
+to standard output.  With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -A, --address-radix=RADIX   decide how file offsets are printed\n\
   -N, --read-bytes=BYTES      limit dump to BYTES input bytes per file\n\
@@ -320,8 +322,8 @@ Usage: %s [OPTION]... [FILE]...\n\
   -t, --format=TYPE           select output format or formats\n\
   -v, --output-duplicates     do not use * to mark line suppression\n\
   -w, --width[=BYTES]         output BYTES bytes per output line\n\
-      --help                  display this help and exit\n\
       --traditional           accept arguments in pre-POSIX form\n\
+      --help                  display this help and exit\n\
       --version               output version information and exit\n\
 \n\
 Pre-POSIX format specifications may be intermixed, they accumulate:\n\
@@ -362,8 +364,7 @@ RADIX is d for decimal, o for octal, x for hexadecimal or n for none.\n\
 BYTES is hexadecimal with 0x or 0X prefix, it is multiplied by 512\n\
 with b suffix, by 1024 with k and by 1048576 with m.  -s without a\n\
 number implies 3.  -w without a number implies 32.  By default, od\n\
-uses -A o -t d2 -w 16.  With no FILE, or when FILE is -, read standard\n\
-input.\n\
+uses -A o -t d2 -w 16.\n\
 ");
     }
   exit (status);
index d489136..69b2815 100644 (file)
@@ -489,13 +489,15 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Write lines consisting of the sequentially corresponding lines from\n\
+each FILE, separated by TABs, to standard output.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -d, --delimiters=LIST   reuse characters from LIST instead of TABs\n\
   -s, --serial            paste one file at a time instead of in parallel\n\
       --help              display this help and exit\n\
       --version           output version information and exit\n\
 \n\
-With no INPUT, or when INPUT is -, read standard input.\n\
 ");
     }
   exit (status);
index 5928208..234c217 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -1880,6 +1880,7 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Paginate or columnate FILE(s) for printing.\n\
 \n\
   +PAGE             begin printing with page PAGE\n\
   -COLUMN           produce COLUMN-column output and print columns down\n\
index b187944..da7e003 100644 (file)
@@ -1845,6 +1845,7 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Write sorted concatenation of all FILE(s) to standard output.\n\
 \n\
   +POS1 [-POS2]    start a key at POS1, end it before POS2\n\
   -M               compare (unknown) < `JAN' < ... < `DEC', imply -b\n\
index 421ced9..ebb3910 100644 (file)
@@ -104,6 +104,8 @@ Usage: %s [OPTION] [INPUT [PREFIX]]\n\
 ",
              program_name);
     printf ("\
+Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default\n\
+PREFIX is `x'.  With no INPUT, or when INPUT is -, read standard input.\n\
 \n\
   -C, --line-bytes=SIZE   put at most SIZE bytes of lines per output file\n\
   -b, --bytes=SIZE        put SIZE bytes per output file\n\
@@ -113,8 +115,6 @@ Usage: %s [OPTION] [INPUT [PREFIX]]\n\
       --version           output version information and exit\n\
 \n\
 SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.\n\
-With no PREFIX, use x.  With no INPUT, or when INPUT is -, read\n\
-standard input.\n\
 ");
     }
   exit (status);
index c347250..da4ea7c 100644 (file)
--- a/src/sum.c
+++ b/src/sum.c
@@ -70,6 +70,7 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Print checksum and block counts for each FILE.\n\
 \n\
   -r              defeat -s, use BSD sum algorithm, use 1K blocks\n\
   -s, --sysv      use System V sum algorithm, use 512 bytes blocks\n\
index 8ddfdd1..06b373b 100644 (file)
--- a/src/tac.c
+++ b/src/tac.c
@@ -140,14 +140,14 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Write each FILE to standard output, last line first.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -b, --before             attach the separator before instead of after\n\
   -r, --regex              interpret the separator as a regular expression\n\
   -s, --separator=STRING   use STRING as the separator instead of newline\n\
       --help               display this help and exit\n\
       --version            output version information and exit\n\
-\n\
-With no FILE, or when FILE is -, read standard input.\n\
 ");
     }
   exit (status);
index 3f6b8dd..ba9f45b 100644 (file)
@@ -1008,6 +1008,9 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Print last 10 lines of each FILE to standard output.\n\
+With more than one FILE, precede each with a header giving the file name.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -c, --bytes=N            output the last N bytes\n\
   -f, --follow             output appended data as the file grows\n\
@@ -1023,7 +1026,7 @@ print the last N items in the file.  N may have a multiplier suffix:\n\
 b for 512, k for 1024, m for 1048576 (1 Meg).  A first OPTION of -VALUE\n\
 or +VALUE is treated like -n VALUE or -n +VALUE unless VALUE has one of\n\
 the [bkm] suffix multipliers, in which case it is treated like -c VALUE\n\
-or -c +VALUE.  With no FILE, or when FILE is -, read standard input.\n\
+or -c +VALUE.\n\
 ");
     }
   exit (status);
index 515cc85..da4f9de 100644 (file)
--- a/src/tr.c
+++ b/src/tr.c
@@ -326,6 +326,8 @@ Usage: %s [OPTION]... SET1 [SET2]\n\
 ",
              program_name);
       printf ("\
+Translate, squeeze, and/or delete characters from standard input,\n\
+writing to standard output.\n\
 \n\
   -c, --complement        first complement SET1\n\
   -d, --delete            delete characters in SET1, do not translate\n\
@@ -336,8 +338,8 @@ Usage: %s [OPTION]... SET1 [SET2]\n\
 ");
       printf ("\
 \n\
-SETs are specified as strings of characters.  Most represent\n\
-themselves.  Here are the special writings:\n\
+SETs are specified as strings of characters.  Most represent themselves.\n\
+Interpreted sequences are:\n\
 \n\
   \\NNN            character with octal value NNN (1 to 3 octal digits)\n\
   \\\\              backslash\n\
index d841c52..afcbf4d 100644 (file)
@@ -453,6 +453,8 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
+Convert spaces in each FILE to tabs, writing to standard output.\n\
+With no FILE, or when FILE is -, read standard input.\n\
 \n\
   -a, --all           convert all whitespace, instead of initial whitespace\n\
   -t, --tabs=NUMBER   have tabs NUMBER characters apart instead of 8\n\
@@ -460,8 +462,7 @@ Usage: %s [OPTION]... [FILE]...\n\
       --help          display this help and exit\n\
       --version       output version information and exit\n\
 \n\
-Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.  With\n\
-no FILE, or when FILE is -, read standard input.\n\
+Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.\n\
 ");
     }
   exit (status);
index 64a5da3..334bbf3 100644 (file)
@@ -348,6 +348,8 @@ Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\
 ",
              program_name);
       printf ("\
+Discard all but one of successive identical lines from INPUT (or\n\
+standard input), writing to OUTPUT (or standard output).\n\
 \n\
   -c, --count           prefix lines by the number of occurrences\n\
   -d, --repeated        only print duplicate lines\n\
@@ -360,9 +362,8 @@ Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\
       --help            display this help and exit\n\
       --version         output version information and exit\n\
 \n\
-A field is a run of whitespace, than non whitespace characters.\n\
-Fields are skipped before chars.  If OUTPUT not specified, writes to\n\
-standard output.  If INPUT not specified, reads from standard input.\n\
+A field is a run of whitespace, than non-whitespace characters.\n\
+Fields are skipped before chars. \n\
 ");
     }
   exit (status);
index 257e3f9..e8b1208 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -82,15 +82,14 @@ Usage: %s [OPTION]... [FILE]...\n\
 ",
              program_name);
       printf ("\
-\n\
-  -c, --bytes, --chars   print the byte counts\n\
+Print line, word, and byte counts for each FILE, and a total line if\n\
+more than one FILE is specified.  With no FILE, or when FILE is -,\n\
+read standard input.\n\
   -l, --lines            print the newline counts\n\
   -w, --words            print the word counts\n\
+  -c, --bytes, --chars   print the byte counts\n\
       --help             display this help and exit\n\
       --version          output version information and exit\n\
-\n\
-Print lines, words and bytes in that order.  If none of -clw, select\n\
-them all.  With no FILE, or when FILE is -, read standard input.\n\
 ");
     }
   exit (status);