Avoid returning your command when grepping ps output
To avoid returning the command you ran when grepping through PS output in *NIX systems enclose the first character in brackets. For example instead of running:
ps -ef | grep 'foo'
and having the command you ran showing in the results run:
ps -ef | grep '[f]oo'
Written by Franco Reyes
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#