Here’s a few tips for using grep.
NOTE : Some of these will work with your version of grep, some may not. In Solaris there can be two or three different versions of grep available. If one of these doesn’t work for you, try reading the man page for your version.
shell> grep -P 'text|name' file.txt
shell> find . | xargs grep whatever
3. Search for a string starting with a uppercase or lower case s.
shell> grep [Ss]tring
shell> ps aux | grep '[p]erl'
shell> grep --color='auto' -i error /var/log/messages