diff options
author | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-04-17 16:16:10 +0000 |
---|---|---|
committer | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-04-17 16:16:10 +0000 |
commit | d53cc65a1205f2a1b5a9706441504a993a06aa8f (patch) | |
tree | afe963cde5e3882b8785c963d7d1ec07d458a85a /yes.c | |
parent | 20d662d561d8d642b825bb00c77638af010cf690 (diff) | |
download | busybox-w32-d53cc65a1205f2a1b5a9706441504a993a06aa8f.tar.gz busybox-w32-d53cc65a1205f2a1b5a9706441504a993a06aa8f.tar.bz2 busybox-w32-d53cc65a1205f2a1b5a9706441504a993a06aa8f.zip |
More updates to the docs, and fixes to sync things with the docs.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@467 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'yes.c')
-rw-r--r-- | yes.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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++) |