Skip to content

Instantly share code, notes, and snippets.

@arunssasidhar
Created October 6, 2013 09:07
Show Gist options
  • Save arunssasidhar/6851504 to your computer and use it in GitHub Desktop.
Save arunssasidhar/6851504 to your computer and use it in GitHub Desktop.
Tip : Avoid grep in its own output.
# See grep in Output.
$ ps ax | grep term
5327 ? Sl 0:01 gnome-terminal
5508 pts/0 S+ 0:00 grep --color=auto term
# Solution for this problem.
$ ps ax | grep [t]erm
5327 ? Sl 0:01 gnome-terminal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment