<br><br>On Thu, Mar 20, 2014 at 7:57 AM, Matthew Cengia <<a href="mailto:mattcen@gmail.com">mattcen@gmail.com</a>> wrote:<br>> On 2014-03-21 00:54, Matthew Cengia wrote:<br>> [...]<br>>> while read -r pid cmd; do [[ $cmd = $sleep_argv0* ]] && kill -9 "$pid"; done < <(ps -opid=,args= -u"$(id -u)") && sleep 0.1<br>
><br><br>What do you make of this one?<br><br><div class="del" style="color:red;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">- 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</div>
<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+ pkill -f "^$sleep_argv0" && sleep 0.1</div><div><br></div><div>Super simple.</div>
<div><br></div><div>Looks like OSX and FreeBSD both have pkill too: <a href="http://www.freebsd.org/cgi/man.cgi?query=pkill&sektion=1">http://www.freebsd.org/cgi/man.cgi?query=pkill&sektion=1</a> and <a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/pkill.1.html">https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/pkill.1.html</a></div>