Skip to content

Instantly share code, notes, and snippets.

@Splint3r7
Created October 29, 2019 17:12
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 Splint3r7/3e9a80a0d6c8659f1020bc1e755b9dda to your computer and use it in GitHub Desktop.
Save Splint3r7/3e9a80a0d6c8659f1020bc1e755b9dda to your computer and use it in GitHub Desktop.
#!/bin/bash
FS=$'\n'
old_pr=$(ps -eo command)
while true; do
new_pr=$(ps -eo command)
diff <(echo "$old_pr") <(echo "$new_pr") | grep [\<\>]
sleep 1
old_pr=$new_pr
done
//@mreiaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment