Date: Mon, 23 Aug 2010 14:20:15 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: bf1783@gmail.com Cc: freebsd-current@freebsd.org, gabor@freebsd.org Subject: Re: Official request: Please make GNU grep the default Message-ID: <86r5hpwmf4.fsf@ds4.des.no> In-Reply-To: <AANLkTinZtyz=L32Pqch_m76zuSMK8FWaM=VWM70YZF%2B_@mail.gmail.com> (b. f.'s message of "Fri, 20 Aug 2010 21:07:56 %2B0000") References: <AANLkTinPj0x=ZZ6w_hdkt1_DdZ19AvUoRzcZyCKY%2BndB@mail.gmail.com> <86mxshdqgh.fsf@ds4.des.no> <AANLkTinZtyz=L32Pqch_m76zuSMK8FWaM=VWM70YZF%2B_@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"b. f." <bf1783@googlemail.com> writes: > Dag-Erling Sm=C3=B8rgrav <des@des.no> writes: > > "Does not seem to work properly" is not a very useful statement. The > > least you could do is provide an example. > I did provide an example, later in the same sentence that you quoted. I forgot to answer this part. By example, I mean an actual grep command line and sample input that demonstrates the problem, the smaller the better: % echo elisp lisp | grep -w lisp && echo good || echo bad elisp lisp good % echo elisp lisp | grep -wq lisp && echo good || echo bad bad No idea what causes it, but a quick grep (hah!) for qflag turns up the following horror: /* Find out the correct return value according to the results and the command line option. */ exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); which shows that -q *does* affect the exit code, but my brain refuses to try to understand that code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r5hpwmf4.fsf>