-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Rudolf Kastl on 4/5/2007 6:33 AM:
> Hello to you!
> 
> actually the cut manpage has a bug in it:

Which is generated from 'cut --help', but that has the same problem.

> 
> SYNOPSIS
>        cut [OPTION]... [FILE]...
> 
> implies that it does need neither an option set nor files listed.

Whereas POSIX lists three synopses, and later in 'cut --help' mentions
that cut requires exactly one of -b, -c, or -f (unless you are using
- --help or --version).

How about this for a patch:

ChangeLog:
2007-04-05  Eric Blake  <[EMAIL PROTECTED]>

        * src/cut.c (usage): Improve --help output.
        Reported by Rudolf Kastl.

doc/ChangeLog:
2007-04-05  Eric Blake  <[EMAIL PROTECTED]>

        * coreutils.texi (cut invocation): Improve cut synopsis.
        Reported by Rudolf Kastl.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFO3684KuGfSFAYARAmf7AJ46rHb0wrswdP51omVy2Wj/B3H+DACghDR6
cwdHyIeYzGdkEeZSar/MRKM=
=eOuo
-----END PGP SIGNATURE-----
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 81b1fc7..d211515 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4921,7 +4921,9 @@ input file, or standard input if no files are given or 
for a file name of
 @samp{-}.  Synopsis:
 
 @example
-cut [EMAIL PROTECTED]@dots{} [EMAIL PROTECTED]@dots{}
+cut -b @var{byte-list} [EMAIL PROTECTED]@dots{} [EMAIL PROTECTED]@dots{}
+cut -c @var{character-list} [EMAIL PROTECTED]@dots{} [EMAIL PROTECTED]@dots{}
+cut -f @var{field-list} [EMAIL PROTECTED]@dots{} [EMAIL PROTECTED]@dots{}
 @end example
 
 In the table which follows, the @var{byte-list}, @var{character-list},
diff --git a/src/cut.c b/src/cut.c
index c9b8359..fc385bf 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -1,5 +1,5 @@
 /* cut - remove parts of lines of files
-   Copyright (C) 1997-2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2007 Free Software Foundation, Inc.
    Copyright (C) 1984 David M. Ihnat
 
    This program is free software; you can redistribute it and/or modify
@@ -186,7 +186,9 @@ usage (int status)
   else
     {
       printf (_("\
-Usage: %s [OPTION]... [FILE]...\n\
+Usage: %s -b LIST [OPTION]... [FILE]...\n\
+  or:  %s -c LIST [OPTION]... [FILE]...\n\
+  or:  %s -f LIST [OPTION]... [FILE]...\n\
 "),
              program_name);
       fputs (_("\
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to