Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save padovah4ck/f8d8b10a4a2b76aec566f47cd735ef76 to your computer and use it in GitHub Desktop.

Select an option

Save padovah4ck/f8d8b10a4a2b76aec566f47cd735ef76 to your computer and use it in GitHub Desktop.

Revisions

  1. padovah4ck renamed this gist Jun 28, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @jsvazic jsvazic revised this gist Mar 18, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -3,10 +3,10 @@
    # Loop by line
    IFS=$'\n'

    old_process=$(ps -eo command)
    old_process=$(ps aux --forest | grep -v "ps aux --forest" | grep -v "sleep 1" | grep -v $0)

    while true; do
    new_process=$(ps -eo command)
    new_process=$(ps aux --forest | grep -v "ps aux --forest" | grep -v "sleep 1" | grep -v $0)
    diff <(echo "$old_process") <(echo "$new_process") | grep [\<\>]
    sleep 1
    old_process=$new_process
  3. @jsvazic jsvazic created this gist Mar 13, 2018.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/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