Tuesday, October 13, 2009

Grep command.

if you want to grep one word on the file you can type grep .
Ex.

grep facebook cookies.txt
.facebook.com TRUE / FALSE 1256032076 locale en_GB

but when you want to grep or , this command will help you.

grep "facebook\|zynga" cookies.txt
.facebook.com TRUE / FALSE 1256032076 locale en_GB
mwfb.zynga.com FALSE /mwfb/ FALSE 1255435201

I can use the upper command only in Linux but in Solaris use this pattern
'/usr/xpg4/bin/grep -E 'facebook|zynga' cookies.txt'

-- TaTsHuYa --

No comments: