summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-05-13 18:34:54 +0000
committerJim Meyering <jim@meyering.net>1995-05-13 18:34:54 +0000
commit7cdc7a0bd9dfa7a106a27115eb6fa1a3ee0f28ad (patch)
tree977d95cd30e4083cdebe7ce708c4940438689d05 /src
parente8be969ec8dabc29cf0f55750fdde2a52cc0df23 (diff)
downloadcoreutils-7cdc7a0bd9dfa7a106a27115eb6fa1a3ee0f28ad.tar.xz
(usage): Include one- or two-line synopsis in --help output.
From Karl Berry.
Diffstat (limited to 'src')
-rw-r--r--src/cat.c1
-rw-r--r--src/cksum.c1
-rw-r--r--src/comm.c1
-rw-r--r--src/csplit.c2
-rw-r--r--src/cut.c1
-rw-r--r--src/expand.c5
-rw-r--r--src/fmt.c7
-rw-r--r--src/fold.c2
-rw-r--r--src/head.c6
-rw-r--r--src/join.c6
-rw-r--r--src/nl.c3
-rw-r--r--src/od.c7
-rw-r--r--src/paste.c4
-rw-r--r--src/pr.c1
-rw-r--r--src/sort.c1
-rw-r--r--src/split.c4
-rw-r--r--src/sum.c1
-rw-r--r--src/tac.c4
-rw-r--r--src/tail.c5
-rw-r--r--src/tr.c6
-rw-r--r--src/unexpand.c5
-rw-r--r--src/uniq.c7
-rw-r--r--src/wc.c9
23 files changed, 58 insertions, 31 deletions
diff --git a/src/cat.c b/src/cat.c
index 764778f85..8c250fc1e 100644
--- 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\
diff --git a/src/cksum.c b/src/cksum.c
index 28b58e159..9b1e79e7d 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -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\
diff --git a/src/comm.c b/src/comm.c
index 1df70a574..ad980d7e5 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -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\
diff --git a/src/csplit.c b/src/csplit.c
index dedbec8ba..cf1257d84 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -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\
diff --git a/src/cut.c b/src/cut.c
index 132373a59..cd103d3ed 100644
--- 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\
diff --git a/src/expand.c b/src/expand.c
index 2488711de..d7366a26b 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -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);
diff --git a/src/fmt.c b/src/fmt.c
index 506d1cc66..1d1565159 100644
--- 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);
diff --git a/src/fold.c b/src/fold.c
index 1da75ccb7..2dfd30f79 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -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\
diff --git a/src/head.c b/src/head.c
index 07c278219..67e0f15e2 100644
--- a/src/head.c
+++ b/src/head.c
@@ -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);
diff --git a/src/join.c b/src/join.c
index 26b855d81..3d0320ae4 100644
--- a/src/join.c
+++ b/src/join.c
@@ -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\
diff --git a/src/nl.c b/src/nl.c
index e7a155a33..f9ac3c9d7 100644
--- 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);
diff --git a/src/od.c b/src/od.c
index fb9a92737..99d999499 100644
--- 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);
diff --git a/src/paste.c b/src/paste.c
index d48913627..69b2815f1 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -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);
diff --git a/src/pr.c b/src/pr.c
index 5928208c0..234c217b9 100644
--- 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\
diff --git a/src/sort.c b/src/sort.c
index b1879443b..da7e0034b 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -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\
diff --git a/src/split.c b/src/split.c
index 421ced910..ebb3910e3 100644
--- a/src/split.c
+++ b/src/split.c
@@ -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);
diff --git a/src/sum.c b/src/sum.c
index c34725079..da4ea7c02 100644
--- 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\
diff --git a/src/tac.c b/src/tac.c
index 8ddfdd1fd..06b373bcc 100644
--- 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);
diff --git a/src/tail.c b/src/tail.c
index 3f6b8dd54..ba9f45be6 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -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);
diff --git a/src/tr.c b/src/tr.c
index 515cc8512..da4f9deb2 100644
--- 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\
diff --git a/src/unexpand.c b/src/unexpand.c
index d841c5283..afcbf4d4b 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -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);
diff --git a/src/uniq.c b/src/uniq.c
index 64a5da3d3..334bbf38e 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -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);
diff --git a/src/wc.c b/src/wc.c
index 257e3f983..e8b120827 100644
--- 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);