Archive for November, 2009

Tip of the Day: find string in a file via commandline

Friday, November 13th, 2009

Sometimes we want to know if certain words or strings are in a file.

Fear not, here’s a simple way to do it:

root@localhost ~]# fgrep <keyword> <filename>

Let’s say I’m searching for the string ‘copy’ inside a shell script called check:

root@localhost ~]# fgrep copy check

I’ll get the entire line:

“Copy not finished”;

Book of the Month: VI Tips Essential vi/vim Editor Skills

Wednesday, November 11th, 2009

VItipsHere’s a good read for those who are new to vi/vim editor.
As for me, I really like vim for a very simple reason there’s no need to use mouse :p.