Posterous theme by Cory Watilo

Grep

GREP:: Prints line matching a pattern. While digging out for pattern matching stuffs, i came across a brilliant search utility that works fine on Gnu/Linux. Actually all my mobile numbers were scattered in different files and each file containing huge amount of text including mobile numbers!! And i only wanted those numbers.<br />

 

atif@ct:~$ grep [0-9] home/atif/foo home/atif/bar
home/atif/foo:+91 9930001234
home/atif/foo:+91 9833730782
home/atif/foo:+91 9890422344
home/atif/bar:+91 9878565545
home/atif/bar:+91 9890786567