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

Unknown's avatar

About Ahmed Tawfik

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

Leave a comment