Debian Bug report logs -
#435411
grep: Option -e cannot be combined with other options
Reported by: Jari Aalto <jari.aalto@cante.net>
Date: Tue, 31 Jul 2007 14:45:02 UTC
Severity: normal
Found in version grep/2.5.1.ds2-6
Done: Aníbal Monsalve Salazar <anibal@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, bug-grep@gnu.org, Anibal Monsalve Salazar <anibal@debian.org>:
Bug#435411; Package grep.
(full text, mbox, link).
Acknowledgement sent to Jari Aalto <jari.aalto@cante.net>:
New Bug report received and forwarded. Copy sent to bug-grep@gnu.org, Anibal Monsalve Salazar <anibal@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: grep
Version: 2.5.1.ds2-6
Severity: normal
Consider this:
$ gzip -dc edb_1.21-13.diff.gz | grep -eF '--- '
grep: unrecognized option `--- '
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
$ gzip -dc edb_1.21-13.diff.gz | grep -F -e '--- '
--- edb-1.21.orig/debian/dirs
--- edb-1.21.orig/debian/docs
...
PROBLEM
It should be possible to combine short options together, including -e.
The effect of "e" could be postponed until the current option "goup".
An example:
-eF
That should be equal to
-Fe
Likewise with any number of other options "grouped", like:
-iFe
-eFi
...
I understand that the -e is a modifier, like -F is a modifier for the
next argument that follows.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US)
Shell: /bin/sh linked to /bin/bash
Versions of packages grep depends on:
ii libc6 2.6-2 GNU C Library: Shared libraries
grep recommends no packages.
-- no debconf information
Information forwarded to debian-bugs-dist@lists.debian.org, Anibal Monsalve Salazar <anibal@debian.org>:
Bug#435411; Package grep.
(full text, mbox, link).
Acknowledgement sent to Andreas Schwab <schwab@suse.de>:
Extra info received and forwarded to list. Copy sent to Anibal Monsalve Salazar <anibal@debian.org>.
(full text, mbox, link).
Message #10 received at submit@bugs.debian.org (full text, mbox, reply):
Jari Aalto <jari.aalto@cante.net> writes:
> Consider this:
>
> $ gzip -dc edb_1.21-13.diff.gz | grep -eF '--- '
This is the same as "... | grep -e F '--- '
> It should be possible to combine short options together, including -e.
"-e" takes an argument, that must follow immediately (either directly or
as the next argument). That's how getopt works for every other utility,
and how POSIX requires that option arguments are handled (see
<http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html>).
> I understand that the -e is a modifier, like -F is a modifier for the
> next argument that follows.
"-F" does take an argument. It is an option on its own, modifying the
operation of the utility.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded to debian-bugs-dist@lists.debian.org, Anibal Monsalve Salazar <anibal@debian.org>:
Bug#435411; Package grep.
(full text, mbox, link).
Acknowledgement sent to Andreas Schwab <schwab@suse.de>:
Extra info received and forwarded to list. Copy sent to Anibal Monsalve Salazar <anibal@debian.org>.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Anibal Monsalve Salazar <anibal@debian.org>:
Bug#435411; Package grep.
(full text, mbox, link).
Acknowledgement sent to Tony Abou-Assaleh <taa@acm.org>:
Extra info received and forwarded to list. Copy sent to Anibal Monsalve Salazar <anibal@debian.org>.
(full text, mbox, link).
Message #20 received at submit@bugs.debian.org (full text, mbox, reply):
According the man page, -e expects a pattern following it as an argument
to the option. Therefore, -eF is incorrect as it doesn't follow the syntax
specification. And there is no easy way to make sense out of a syntax that
would allow -eF, since multiple -e options are allowed.
Cheers,
TAA
-----------------------------------------------------
Tony Abou-Assaleh
Email: taa@acm.org
Web site: http://tony.abou-assaleh.net
----------------------[THE END]----------------------
On Tue, 31 Jul 2007, Jari Aalto wrote:
> Package: grep
> Version: 2.5.1.ds2-6
> Severity: normal
>
>
> Consider this:
>
> $ gzip -dc edb_1.21-13.diff.gz | grep -eF '--- '
> grep: unrecognized option `--- '
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try `grep --help' for more information.
>
> $ gzip -dc edb_1.21-13.diff.gz | grep -F -e '--- '
> --- edb-1.21.orig/debian/dirs
> --- edb-1.21.orig/debian/docs
> ...
>
> PROBLEM
>
> It should be possible to combine short options together, including -e.
> The effect of "e" could be postponed until the current option "goup".
> An example:
>
> -eF
>
> That should be equal to
>
> -Fe
>
> Likewise with any number of other options "grouped", like:
>
> -iFe
> -eFi
> ...
>
> I understand that the -e is a modifier, like -F is a modifier for the
> next argument that follows.
>
> -- System Information:
> Debian Release: lenny/sid
> APT prefers testing
> APT policy: (990, 'testing')
> Architecture: i386 (i686)
>
> Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
> Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US)
> Shell: /bin/sh linked to /bin/bash
>
> Versions of packages grep depends on:
> ii libc6 2.6-2 GNU C Library: Shared libraries
>
> grep recommends no packages.
>
> -- no debconf information
>
>
>
Information forwarded to debian-bugs-dist@lists.debian.org, Anibal Monsalve Salazar <anibal@debian.org>:
Bug#435411; Package grep.
(full text, mbox, link).
Acknowledgement sent to Tony Abou-Assaleh <taa@acm.org>:
Extra info received and forwarded to list. Copy sent to Anibal Monsalve Salazar <anibal@debian.org>.
(full text, mbox, link).
Reply sent
to Aníbal Monsalve Salazar <anibal@debian.org>:
You have taken responsibility.
(Mon, 05 Apr 2010 05:27:04 GMT) (full text, mbox, link).
Notification sent
to Jari Aalto <jari.aalto@cante.net>:
Bug acknowledged by developer.
(Mon, 05 Apr 2010 05:27:04 GMT) (full text, mbox, link).
Message #30 received at 435411-done@bugs.debian.org (full text, mbox, reply):
Version: 2.5.1.ds2-6
On Wed, Aug 01, 2007 at 12:39:07AM +0200, Andreas Schwab wrote:
>Jari Aalto <jari.aalto@cante.net> writes:
>
>>Consider this:
>>
>> $ gzip -dc edb_1.21-13.diff.gz | grep -eF '--- '
>
>This is the same as "... | grep -e F '--- '
>
>>It should be possible to combine short options together, including
>>-e.
>
>"-e" takes an argument, that must follow immediately (either directly
>or
>as the next argument). That's how getopt works for every other
>utility,
>and how POSIX requires that option arguments are handled (see
><http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html>).
>
>>I understand that the -e is a modifier, like -F is a modifier for
>>the
>>next argument that follows.
>
>"-F" does take an argument. It is an option on its own, modifying the
>operation of the utility.
On Sat, Aug 04, 2007 at 01:45:42PM -0300, Tony Abou-Assaleh wrote:
>According the man page, -e expects a pattern following it as an
>argument to the option. Therefore, -eF is incorrect as it doesn't
>follow the syntax specification. And there is no easy way to make sense
>out of a syntax that would allow -eF, since multiple -e options are
>allowed.
Closing this bug report accordingly.
No longer marked as fixed in versions 2.5.1.ds2-6.
Request was from Andreas Beckmann <anbe@debian.org>
to control@bugs.debian.org.
(Sat, 02 Nov 2013 15:57:45 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 01 Dec 2013 07:28:14 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Oct 11 23:41:54 2017;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.