Seriously? People still do this?
ps -ef | grep foo | grep -v grep
This always works: ps -ef | grep '[f]oo'
And, if you're running a modern operating system: pgrep foo