Colorized grep — viewing the entire file with highlighted matches
Here are some ways to do it: grep –color ‘pattern\|$’ file grep –color -E ‘pattern|$’ file egrep –color ‘pattern|$’ file The | symbol is the OR operator. Either escape it using \ or tell grep that the search text has to be interpreted as regular expressions by adding -E or using the egrep command instead … Read more