Instantly share code, notes, and snippets.

anonymous /procmon.sh Secret
Created Mar 16, 2018

Embed
What would you like to do?
#!/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