[Ilugc] .a-tip-a-day. (grep - find lines matching pattern)

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Mon Nov 9 12:05:54 2009

$ grep girish /etc/passwd

is known. grep stands for "global regular expression print"

In fact it is so well known that I often think that grep should be
made an English verb.

Anyway the above is not the tip.

$ grep --color girish /etc/passwd

shows the matching lines with the keyword in color.

Also -r is recursive grep. -i is case insensitive grep and -v is non
matching lines...

fgrep is useful when you want to have regular expressions like ".iso"
in the lookup string.

zfgrep is for grepping gzipped files.

-Girish

-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

Other related posts: