-
-
Save mgol/10657381 to your computer and use it in GitHub Desktop.
Revisions
-
mgol revised this gist
Jan 26, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,17 +3,17 @@ # Usage: move this file to ~/bin/ and create a link ~/bin/psa-full -> psa. # `psa STRING` will show you the output clipped to current number of columns in # the terminal, `psa-full STRING` will give the full output. # Tested on OS X 10.9-10.10. if [[ "`basename "$0"`" == *-full ]]; then COLS=10000 else COLS=`tput cols` fi PS_COMMAND='ps axo pid,ppid,tty,user,group,time,pcpu,pmem,args' if [ $# -eq 0 ]; then eval "$PS_COMMAND" | cut -b1-$COLS else eval "$PS_COMMAND" | egrep -v "(/bin/sh $HOME/bin/psa|$PS_COMMAND|egrep)" | egrep -i '(PID\s+PPID\s+TTY\s+USER\s+GID\s+TIME\s+\%CPU\s+\%MEM\s+ARGS|'"$1"')' | cut -b1-$COLS fi -
mgol revised this gist
Apr 14, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ # Usage: move this file to ~/bin/ and create a link ~/bin/psa-full -> psa. # `psa STRING` will show you the output clipped to current number of columns in # the terminal, `psa-full STRING` will give the full output. # Tested on OS X 10.9. if [[ "`basename "$0"`" == *-full ]]; then COLS=10000 -
mgol revised this gist
Apr 14, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ #!/bin/sh # Usage: move this file to ~/bin/ and create a link ~/bin/psa-full -> psa. # `psa STRING` will show you the output clipped to current number of columns in # the terminal, `psa-full STRING` will give the full output. if [[ "`basename "$0"`" == *-full ]]; then COLS=10000 else -
mgol created this gist
Apr 14, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/sh if [[ "`basename "$0"`" == *-full ]]; then COLS=10000 else COLS=`tput cols` fi PS_COMMAND='ps axo pid,ppid,tty,user,group,time,pcpu,pmem,args' if [ $# -eq 0 ]; then eval "$PS_COMMAND" | cut -b1-$COLS else eval "$PS_COMMAND" | egrep -v "(/bin/sh $HOME/bin/psa|$PS_COMMAND|egrep)" | egrep -i '(PID\s+PPID\s+TTY\s+USER\s+GID\s+TIME\s+\%CPU\s+\%MEM\s+ARGS|'"$1"')' | cut -b1-$COLS fi