Re: Fwd: Re: grep command not working as expected



Stephen Allen <freebsduk@xxxxxxxxxxxxxx> wrote:
A simple grep command, 'grep -vf patternfile inputfile' works on Linux,
but the same command doesn't work on FreeBSD-6.1.

Can you provide an example, please? "grep -fv" seems to
work fine for me on FreeBSD 6.1.

To make it work I found I had to use -F to force the interpretation of
fixed-strings. I don't know why it made a difference from Linux, and
nothing in the man page appears to mention why.

The -F option is documented in the manual page. Without
it, patterns are interpreted as basic regular expressions.
With that option, they're interpreted as fixed string.

If Linux behaves differently, then that's a bug in Linux
rather than in FreeBSD. But then again, both Linux and
FreeBSD use GNU grep ...

Best regards
Oliver

--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"C++ is to C as Lung Cancer is to Lung."
-- Thomas Funke
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: FreeBSD 4.x Opteron Question
    ... the FreeBSD developers told everyone that 5.3 was da ... initially over linux not because there's a bunch of good guys on the ... My tests measure kernel performance; ... > a networking device is a key performance indicator. ...
    (freebsd-questions)
  • Re: Newbie Experience
    ... I've only been around since FreeBSD 5.4 ... FreeBSD kernel too. ... always sunshine and linux is farts. ... in the hey day of AT&T Unix I'm ...
    (freebsd-questions)
  • Re: Review of FreeBSD 5.4
    ... but not less problems compared to FreeBSD. ... If you like to have a bleeding edge system using debian --- just go ... > the linux kernel suffers. ... When the kernel suffers, everyone who uses ...
    (comp.unix.bsd.freebsd.misc)
  • Re: FreeBSD & Linux distro
    ... as a FreeBSD advocacy the tone of the article should be neutral and all ... do not like Linux and more over I have never used it in my life but I ... Statement of the type BSD appears more stable than Linux is ... fewer FreeBSD advocates make claims like that, however, is part of the ...
    (freebsd-questions)
  • Re: Compare Linux and Freebsd Redux
    ... >> Perhaps the most unsettling 'misinformation' about the FreeBSD vs. ... >> Linux situation was the spin that Linux was somehow more 'open', ... >> the official Linux tree... ... your own distribution is that the FreeBSD distribution is/was already ...
    (comp.unix.bsd.freebsd.misc)