GNU bug report logs - #27783
display help instead of pattern search

Previous Next

Package: grep;

Reported by: PAYET Matthieu -EXT <matthieu.payet-ext <at> transport.alstom.com>

Date: Fri, 21 Jul 2017 15:02:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27783 in the body.
You can then email your comments to 27783 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#27783; Package grep. (Fri, 21 Jul 2017 15:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to PAYET Matthieu -EXT <matthieu.payet-ext <at> transport.alstom.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Fri, 21 Jul 2017 15:02:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: PAYET Matthieu -EXT <matthieu.payet-ext <at> transport.alstom.com>
To: "bug-grep <at> gnu.org" <bug-grep <at> gnu.org>
Subject: display help instead of pattern search
Date: Fri, 21 Jul 2017 07:46:20 +0000
[Message part 1 (text/plain, inline)]
Hello,

Grep v2.6.3

> grep -ri "--help" .

Displays the help message instead of searching for the requested pattern.
Same behavior for the pattern "--version"

Matthieu P.

________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Fri, 21 Jul 2017 15:09:01 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Fri, 21 Jul 2017 15:09:02 GMT) Full text and rfc822 format available.

Notification sent to PAYET Matthieu -EXT <matthieu.payet-ext <at> transport.alstom.com>:
bug acknowledged by developer. (Fri, 21 Jul 2017 15:09:04 GMT) Full text and rfc822 format available.

Message #12 received at 27783-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: PAYET Matthieu -EXT <matthieu.payet-ext <at> transport.alstom.com>,
 27783-done <at> debbugs.gnu.org
Subject: Re: bug#27783: display help instead of pattern search
Date: Fri, 21 Jul 2017 10:07:58 -0500
[Message part 1 (text/plain, inline)]
tag 27783 notabug
thanks

On 07/21/2017 02:46 AM, PAYET Matthieu -EXT wrote:
> Hello,
> 
> Grep v2.6.3
> 
>> grep -ri "--help" .
> 
> Displays the help message instead of searching for the requested pattern.

Because you didn't tell grep the options were over.  You want:

grep -ri -- --help

> Same behavior for the pattern "--version"

Ditto for any other pattern with a leading '-' - use -- to tell grep
that you are done with option parsing and to treat the next argument as
a pattern or filename.

> CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged.

Sorry, but your disclaimer is unenforceable on publicly-archived lists.
Please consider using a personal address to avoid spamming us with your
employer's legalese.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Aug 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.