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

  • From: gnukid@xxxxxxxxx (Noorul Islam)
  • Date: Mon Nov 9 15:06:10 2009

On Mon, Nov 9, 2009 at 12:04 PM, Girish Venkatachalam
<girishvenkatachalam@xxxxxxxxx> wrote:

$ 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.


Note: If you pipe output to another program, coloring is gone.

Eg:- $ grep --color girish /etc/passwd | less

Thanks
Noorul

Other related posts: