"Richard W.M. Jones" <rjones(a)redhat.com> wrote:
On Thu, Apr 10, 2008 at 05:45:19PM +0200, Jim Meyering wrote:
+1 but shame that egrep doesn't support some notion of \t for
tab or the like:
> + @grep -lE '^ * ' /dev/null \
Yeah, that's annoying. It makes me want to use Perl sometimes.
However, GNU grep does have a --perl-regexp (-P) option, so
this would work,
$ printf 'x\t'|grep -P '\t'
x
but it's not portable enough. Even among systems with recent
GNU grep, some compile it out, e.g. Debian's grep says this:
grep: Support for the -P option is not compiled into this --disable-perl-regexp
binary