All pastes #463286 Raw Edit

for_w00fy

public shellscript v1 · immutable
#463286 ·published 2007-04-28 21:53 UTC
rendered paste body
#!/bin/shPROCS=$(ps auwx|grep '$1'|grep 'ssh'|grep -v 'grep|/usr/sbin/sshd'|awk '{print $2}')if [ $1 ]; then        if [ $PROCS ]; then                for i in $PROCS; do                        kill -9 $i                done        else                    printf "No procs found for that user!\n"        fielse            printf "You didn't specify a user name!\n"fi