bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #16635] synopsis on man page shows pattern as optional


From: Benno Schulenberg
Subject: [bug #16635] synopsis on man page shows pattern as optional
Date: Sat, 20 May 2006 16:55:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060418 Firefox/1.0.8

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16635>

                 Summary: synopsis on man page shows pattern as optional
                 Project: grep
            Submitted by: bens
            Submitted on: Saturday 05/20/2006 at 16:55
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:


The synopsis of grep on its man page says:

  grep [OPTIONS] PATTERN [FILE...]
  grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]

The second line gives the impression that a pattern and pattern file are
optional, which is mistaken.  How to express this correctly in a single line,
I dont't know.  The synopsis on
http://www.opengroup.org/onlinepubs/009695399/utilities/grep.html takes three
lines to show that either a pattern or a pattern file should be given.

Maybe this is an alternative:

  grep [OPTIONS] [-e] PATTERN [FILE...]
  grep [OPTIONS] -f FILE [FILE...]

But in fact GNU grep allows -e and -f together, and even mutiple -e's and
-f's, so a fully descriptive synopsis would be:

  grep [OPTIONS] [-e] PATRN [-e PATRN]... [-f FILE]... FILE...]
  grep [OPTIONS] [-e PATRN]... -f FILE [-f FILE]... [FILE...]

But this is... ugly.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16635>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]