Highlight your grep results

Used grep command before ?
grep is a very good command that allows you to grep text šŸ™‚
It allows you to search the contents of a file/group of files for a string (regular expression)

of course it is great, but the output may be somewhat confusing !!!!

so, try this:
alias grep=’grep –color=always’
then try to use grep, you will see the output contains the string you search for is highlighted.

try to put this command in your .bashrc file in order not to re-alias it each time, like that :
echo “alias grep=’grep –color=always'” >> ~/.bashrc

About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s