]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(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 764778f85e3a863b3852512edcde4aae65a67d5f..8c250fc1e7577f8338ada01108646f74d4b771d5 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 28b58e1594af69875b4fbd2909ea808039404cb6..9b1e79e7d48d7911cc12359353daad84c5ecc40d 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 1df70a5743098b8180b73093cfbdec7882e51960..ad980d7e58b24eb1cdbd49d6cc1acda047720327 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 dedbec8ba1375e0605dd35a6dc58529dfc5c0512..cf1257d84da62f3f1a2e6ece6438028426e3b468 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 132373a59e655149163052db059f85f75f734987..cd103d3ed519c0c63ea0d75e262986e1db096cd1 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 2488711de860c8f3197d71a41ab28b1971f8c55b..d7366a26b97e94dfdd6be6b08d4102d691dd97c2 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 506d1cc66ac5b0b288adcfad3e9f0315c1b2ba47..1d156515900d27859539f6abcf42dec7c265f672 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 1da75ccb7080f1d840e13e3c67e9507db5e82d0c..2dfd30f79338c2fb8466f01352fccfc21c3feacf 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 07c27821994cf40930a88e6f68f20ebdf7d03887..67e0f15e2733e0636055340d5e8809aa2ca8a367 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 26b855d81a6390cf40b44dbeda5a96f34d4e3f0e..3d0320ae4035b21452d9519cf592002bb2483617 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 e7a155a3396ed530a5ab164c857238014bde1c82..f9ac3c9d7fda9d95adaa892b3fbfb30b7a8e4d01 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 fb9a92737fcee8cf40e8caf213ecb58e1efebd83..99d9994993caa91bfb8f339cd4161ea37d325078 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 d4891362794ad65a20727a552e60ca249400acf6..69b2815f14d39a369deb62c4e47068d845cea118 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 5928208c0f2ec00d75d53c29706768aa72cde35a..234c217b9583912b9f5ff9bf11244fabd01177d3 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 b1879443b665fc423d3307e10517a5cbb9824d4f..da7e0034b6f3c7673f8f1235d686ef50a4fe459e 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 421ced910ef21be8f1f06a444e66eed46c4e51db..ebb3910e323bc8a95bede575c3c80de45c7f47a0 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 c347250799255a55882faa36b8c59a7825d65fe1..da4ea7c02adadbbe1911e999449bb01399b8dcad 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 8ddfdd1fd76bf01e225a0a32174997986d0f509f..06b373bcc29c6baa6d977f81c8380124f77e10fb 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 3f6b8dd54c0e1177a11ed3671fc7c3d0cc0a1a63..ba9f45be6563e14d49045b2e5635ae0abed5f400 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 515cc8512db5e0b7ec8599e87e1caa41e88c82bd..da4f9deb2f0c08c4dff376f98636a7965f9f010a 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 d841c528340a678b1f8f2803db9b7e035c86d3de..afcbf4d4b648250ed01feae44afd9fa3c397d040 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 64a5da3d3e3fded13bc58d39951f8c4209938c2c..334bbf38ecc8b64e1b8f9530d65394c9ae792c30 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 257e3f983ec28370f224761045d584fea7406f78..e8b1208270234bb64fe3921a37f8a8598f9ceb5e 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);