[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fgrep bug
From: |
Stepan Kasal |
Subject: |
Re: fgrep bug |
Date: |
Thu, 2 Dec 2004 08:12:24 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
thank you for taking care to report the bugs.
A small technical note: the bug report address has changed; please use
address@hidden for further mail/reports.
> fgrep foo blah --- blah # that's three - signs
> grep: unrecognized option `---'
> Why the reference to grep not fgrep in the error message?
fgrep is not standardized by POSIX; the POSIX equivalent is ``grep -F''.
Accordingly, recent versions of GNU grep install fgrep as a shell wrapper
around grep.
> Cannot pass multiple files on same command line.
Yes, you can. The problem with the command above is that ``---''
looks like an option. Use ``--'' to terminate the option list:
fgrep -n -- foo blah --- blah
Alternatively, you can set POSIXLY_CORRECT to tell grep that options may
not be interspersed with the other arguments:
$ POSIXLY_CORRECT=1 fgrep x slon --- Makefile
grep: slon: No such file or directory
grep: ---: No such file or directory
Makefile:x:
Makefile:BB = x
> fgrep -n 'foo' blah foo
> grep: blah: No such file or directory
grep should continue to search file ``foo'' here. I have verified that
the latest version, GNU grep 2.5.1, works this way:
$ fgrep -n x slon Makefile
grep: slon: No such file or directory
Makefile:6:x:
Makefile:9:BB = x
Regards,
Stepan Kasal
- fgrep bug, Mike_Clark, 2004/12/01
- Re: fgrep bug,
Stepan Kasal <=