summaryrefslogtreecommitdiff
path: root/yes.c
diff options
context:
space:
mode:
authorErik Andersen2000-04-17 16:16:10 +0000
committerErik Andersen2000-04-17 16:16:10 +0000
commite5b6c7dd9cb32852a7f5b19a9855cf3c32543396 (patch)
treeafe963cde5e3882b8785c963d7d1ec07d458a85a /yes.c
parent4fd10fc73be4ce707c7d55f608d47894a2d1b12c (diff)
downloadbusybox-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.zip
busybox-e5b6c7dd9cb32852a7f5b19a9855cf3c32543396.tar.gz
More updates to the docs, and fixes to sync things with the docs.
-Erik
Diffstat (limited to 'yes.c')
-rw-r--r--yes.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/yes.c b/yes.c
index ac67845..a822ebc 100644
--- a/yes.c
+++ b/yes.c
@@ -27,12 +27,18 @@ extern int yes_main(int argc, char **argv)
{
int i;
- if (argc == 1)
+ if (argc >=1 && *argv[1]=='-') {
+ usage("yes [OPTION]... [STRING]...\n\n"
+ "Repeatedly outputs a line with all specified STRING(s), or `y'.\n");
+ }
+
+ if (argc == 1) {
while (1)
if (puts("y") == EOF) {
perror("yes");
exit(FALSE);
}
+ }
while (1)
for (i = 1; i < argc; i++)