Skip to content

Instantly share code, notes, and snippets.

@mapix
Created December 25, 2012 15:37
Show Gist options
  • Save mapix/4373767 to your computer and use it in GitHub Desktop.
Save mapix/4373767 to your computer and use it in GitHub Desktop.
grep processes list avoiding the grep itself Trick to avoid the form: grep process | grep - v grep This works because "[h]ttpd" matches only an "h" followed by "ttpd". The line that is printed by "ps aux" is "[h]ttpd" which includes the brackets, therefor not matching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment