Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2011 10:40:04 +0900
From:      poyopoyo@puripuri.plala.or.jp
To:        Gabor Kovesdan <gabor@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   bsdgrep-20110912: -F/fgrep enbug
Message-ID:  <86ehzds423.wl%poyopoyo@puripuri.plala.or.jp>

next in thread | raw e-mail | index | archive | help
Hi,

I found another issue, this time in bsdgrep-20110912 in port.

==
#! /bin/sh
echo 1
echo 90123456789.|grep -F 0123456789.
echo 2
echo 90123456789.|grep    0123456789.
echo 3
echo  0123456789.|grep -F 0123456789.
echo 4
echo 90123456789.|grep -F 0123456789
echo 5
echo 90123456789x|grep -F 0123456789x
==
result:
1
2
90123456789.
3
0123456789.
4
90123456789.
5
90123456789x
==
(1) this should match but does not.
(2) without -F it matches.
(3) trim leading 1 byte from input string it matches.
(4) trim last period from query string it matches.
(5) replace period with another character (no matter what it is) it matches.

bsdgrep in -CURRENT and GNU grep match all cases.

-- 
kuro



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ehzds423.wl%poyopoyo>