Skip to content

Instantly share code, notes, and snippets.

@anyuzx
Created February 19, 2017 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anyuzx/b72855a0e9795465115ef6911c498fad to your computer and use it in GitHub Desktop.
Save anyuzx/b72855a0e9795465115ef6911c498fad to your computer and use it in GitHub Desktop.
extract pid from ps aux command
ps aux | grep name | grep -v grep
ps aux | grep name | grep -v grep | awk '{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment