From e5b6c7dd9cb32852a7f5b19a9855cf3c32543396 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Mon, 17 Apr 2000 16:16:10 +0000 Subject: More updates to the docs, and fixes to sync things with the docs. -Erik --- coreutils/yes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'coreutils/yes.c') 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) { 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++) -- cgit v1.2.3