bin/166862: grep [[:alnum:]]* only matches once
Jim Pryor
dubiousjim at gmail.com
Thu Apr 12 00:50:14 UTC 2012
>Number: 166862
>Category: bin
>Synopsis: grep [[:alnum:]]* only matches once
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 12 00:50:13 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Jim Pryor
>Release: 9.0-PRELEASE
>Organization:
>Environment:
FreeBSD vaio.jimpryor.net 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0: Tue Nov 29 02:45:33 EST 2011 root at vaio.jimpryor.net:/usr/obj/usr/src/sys/MINE amd64
>Description:
This behaves as expected:
$ printf '_abc d_ef 1ghi' | grep -o '[[:alnum:]_]\+'
_abc
d_ef
1ghi
But this gives only a single match:
8:36 PM vaio pts8 .../arch/usr/share/man $ printf '_abc d_ef 1ghi' | grep -o '[[:alnum:]_]*'
_abc
Same results if we use egrep instead, or use "\w" instead of "[[:alnum:]_]".
grep version line:
/* $FreeBSD: src/usr.bin/grep/grep.c,v 1.11.2.3 2011/10/20 16:08:11 gabor Exp $
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list