Skip to content

Instantly share code, notes, and snippets.

@flavianmissi
Created November 16, 2014 18:12
Show Gist options
  • Save flavianmissi/5e98e244c66e44d2480b to your computer and use it in GitHub Desktop.
Save flavianmissi/5e98e244c66e44d2480b to your computer and use it in GitHub Desktop.
awk: filter processes ids based on pattern and writes to file
ps -ef |grep "python challange" | awk '{print $2;}' > tmp
# to kill them:
kill -9 $(cat tmp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment