On Thu, Mar 20, 2014 at 7:57 AM, Matthew Cengia <[email protected]> wrote: > On 2014-03-21 00:54, Matthew Cengia wrote: > [...] >> while read -r pid cmd; do [[ $cmd = $sleep_argv0* ]] && kill -9 "$pid"; done < <(ps -opid=,args= -u"$(id -u)") && sleep 0.1 >
What do you make of this one? - kill -9 $(grep -l -r --include="cmdline" "^$sleep_argv0" /proc/ 2>/dev/null | sed -n 's:/proc/\([0-9]\+\)/.*:\1:p' | sort | uniq) 2>/dev/null && sleep 0.1 + pkill -f "^$sleep_argv0" && sleep 0.1 Super simple. Looks like OSX and FreeBSD both have pkill too: http://www.freebsd.org/cgi/man.cgi?query=pkill&sektion=1 and https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/pkill.1.html
_______________________________________________ Password-Store mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/password-store
