aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/tty.c4
-rw-r--r--coreutils/uniq.c14
-rw-r--r--coreutils/wc.c3
-rw-r--r--coreutils/whoami.c4
-rw-r--r--coreutils/yes.c8
5 files changed, 16 insertions, 17 deletions
diff --git a/coreutils/tty.c b/coreutils/tty.c
index 8ac1c1fcd..6f98d1b79 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -25,8 +25,8 @@
25#include <sys/types.h> 25#include <sys/types.h>
26 26
27static const char tty_usage[] = "tty\n\n" 27static const char tty_usage[] = "tty\n\n"
28 "Print the file name of the terminal connected to standard input.\n" 28 "Print the file name of the terminal connected to standard input.\n\n"
29 29 "Options:\n"
30 "\t-s\tprint nothing, only return an exit status\n"; 30 "\t-s\tprint nothing, only return an exit status\n";
31 31
32extern int tty_main(int argc, char **argv) 32extern int tty_main(int argc, char **argv)
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 2eedb886d..0324856fd 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -28,15 +28,9 @@
28#include <errno.h> 28#include <errno.h>
29 29
30static const char uniq_usage[] = 30static const char uniq_usage[] =
31 "uniq [OPTION]... [INPUT [OUTPUT]]\n" 31 "uniq [OPTION]... [INPUT [OUTPUT]]\n\n"
32 "Discard all but one of successive identical lines from INPUT (or\n" 32 "Discard all but one of successive identical lines from INPUT\n"
33 "standard input), writing to OUTPUT (or standard output).\n" 33 "(or standard input), writing to OUTPUT (or standard output).\n";
34 "\n"
35 "\t-h\tdisplay this help and exit\n"
36
37 "\n"
38 "A field is a run of whitespace, then non-whitespace characters.\n"
39 "Fields are skipped before chars.\n";
40 34
41/* max chars in line */ 35/* max chars in line */
42#define UNIQ_MAX 4096 36#define UNIQ_MAX 4096
@@ -190,4 +184,4 @@ int uniq_main(int argc, char **argv)
190 exit(0); 184 exit(0);
191} 185}
192 186
193/* $Id: uniq.c,v 1.8 2000/04/13 01:18:56 erik Exp $ */ 187/* $Id: uniq.c,v 1.9 2000/04/17 16:16:10 erik Exp $ */
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 8004e6294..030afa9d6 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -25,7 +25,8 @@
25 25
26static const char wc_usage[] = "wc [OPTION]... [FILE]...\n\n" 26static const char wc_usage[] = "wc [OPTION]... [FILE]...\n\n"
27 "Print line, word, and byte counts for each FILE, and a total line if\n" 27 "Print line, word, and byte counts for each FILE, and a total line if\n"
28 "more than one FILE is specified. With no FILE, read standard input.\n" 28 "more than one FILE is specified. With no FILE, read standard input.\n\n"
29 "Options:\n"
29 "\t-c\tprint the byte counts\n" 30 "\t-c\tprint the byte counts\n"
30 "\t-l\tprint the newline counts\n" 31 "\t-l\tprint the newline counts\n"
31 32
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 3677c2fbc..5c3fea13f 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -25,9 +25,7 @@
25#include <pwd.h> 25#include <pwd.h>
26 26
27static const char whoami_usage[] = "whoami\n\n" 27static const char whoami_usage[] = "whoami\n\n"
28 "Print the user name associated with the current effective user id.\n" 28 "Prints the user name associated with the current effective user id.\n";
29
30 "Same as id -un.\n";
31 29
32extern int whoami_main(int argc, char **argv) 30extern int whoami_main(int argc, char **argv)
33{ 31{
diff --git a/coreutils/yes.c b/coreutils/yes.c
index ac67845ac..a822ebc1d 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -27,12 +27,18 @@ extern int yes_main(int argc, char **argv)
27{ 27{
28 int i; 28 int i;
29 29
30 if (argc == 1) 30 if (argc >=1 && *argv[1]=='-') {
31 usage("yes [OPTION]... [STRING]...\n\n"
32 "Repeatedly outputs a line with all specified STRING(s), or `y'.\n");
33 }
34
35 if (argc == 1) {
31 while (1) 36 while (1)
32 if (puts("y") == EOF) { 37 if (puts("y") == EOF) {
33 perror("yes"); 38 perror("yes");
34 exit(FALSE); 39 exit(FALSE);
35 } 40 }
41 }
36 42
37 while (1) 43 while (1)
38 for (i = 1; i < argc; i++) 44 for (i = 1; i < argc; i++)