Freedom to Write
Monday 19 October 2009
grep using perl
I want to grep lines containing words like Broadcasts or broadcasts from a file like:
cat tv.txt :
this is british broadcasting channel in competition with other abc Broadcasts \n
and foo broadcasts telecasting \n
cricket \n
One-liner grep using perl :
perl -wnl -e 'm|Broadcasts|i and print $_;' tv.txt
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Tweets by @sriramperumalla
No comments:
Post a Comment