Skip to content

Instantly share code, notes, and snippets.

/procmon.sh Secret

Created March 16, 2018 02:11
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 anonymous/4d7069886157170a5bd011adf9c2218b to your computer and use it in GitHub Desktop.
Save anonymous/4d7069886157170a5bd011adf9c2218b to your computer and use it in GitHub Desktop.
#!/bin/bash
# Loop by line
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