Date: Thu, 28 Sep 2006 13:57:25 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-stable@FreeBSD.ORG, freebsduk@rowyerboat.com Subject: Re: Fwd: Re: grep command not working as expected Message-ID: <200609281157.k8SBvP8B081970@lurza.secnetix.de> In-Reply-To: <451AFEC6.1000404@rowyerboat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Stephen Allen <freebsduk@rowyerboat.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609281157.k8SBvP8B081970>