diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-17 16:16:10 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-17 16:16:10 +0000 |
commit | e5b6c7dd9cb32852a7f5b19a9855cf3c32543396 (patch) | |
tree | afe963cde5e3882b8785c963d7d1ec07d458a85a /coreutils/yes.c | |
parent | 4fd10fc73be4ce707c7d55f608d47894a2d1b12c (diff) | |
download | busybox-w32-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.tar.gz busybox-w32-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.tar.bz2 busybox-w32-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.zip |
More updates to the docs, and fixes to sync things with the docs.
-Erik
Diffstat (limited to 'coreutils/yes.c')
-rw-r--r-- | coreutils/yes.c | 8 |
1 files changed, 7 insertions, 1 deletions
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++) |