Skip to content

Instantly share code, notes, and snippets.

@braaaax
Last active March 15, 2018 06:24
Show Gist options
  • Save braaaax/2279594e708cbd21c371850a87f0b16a to your computer and use it in GitHub Desktop.
Save braaaax/2279594e708cbd21c371850a87f0b16a to your computer and use it in GitHub Desktop.
look for new processes
#!/bin/bash
# via ippsec
IFS=$'\n'
old_process=$(ps -eo command)
while true; do
new_process=$(ps -eo command)
diff <(echo "$old_process") <(echo "$new_process") |grep [\<\>]
sleep 1
old_process=$new_process
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment