[Omaha.pm] grep -P
Andy Lester
andy at petdance.com
Mon Jul 16 11:09:52 PDT 2007
On Jul 16, 2007, at 12:41 PM, Jay Hannah wrote:
> -laugh-
>
> I didn't know GNU grep has a command line switch for "Perl regular
> expressions"...
>
> Grab all the lines from myfile.txt that start with chr3 and then a
> tab:
> grep -P "^chr3\t" filename.txt
>
> Or, you could just use Perl:
> perl -ne 'print if (/^chr3\t/)' filename.txt
Or you could use ack: http://petdance.com/ack/
--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance
More information about the Omaha-pm
mailing list