Jan Engelhardt wrote:
>
> On Sep 24 2008 22:16, Ben Bacarisse wrote:
>
>>>> No. grep does not translate \x sequences. But bash has a
>>>> tricks up its sleeves:
>>>> $ grep $'\xe2' test.txt
>>>> def→
>>>
>>> grep -P "\xe2" test.txt

>>
>> I was going to suggest that until I found out that on my system (and
>> thus probably on lots of others) grep is not built with Perl regexps.

>
> Complain to your distro then, because mine has it and it's really a
> life saver :-)


Or you could just use Perl

perl -ne'/\xe2/&&print' test.txt



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall