This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: a try at killall


Lapo Luchini wrote on Sunday, November 09, 2003 7:06 PM:
> Vince Hoffman wrote:
>>> Not complete, but usually works for me 0=)
>>> 
>>> $ cat /usr/local/bin/killall
>>> #!/bin/sh
>>> ps -s | sed -re "/$1$/s/^ +([0-9]+).*$/\1/;t fine;d;:fine" | xargs
>>> kill $2 $3 $4
>>> 
>>> 
>> Any reason not to just use pkill ? (from procps package)
>> (I found it after writing a similar script for solaris. )
>> 
> And I already had it installed, too!

Me, too. But your version can be enhanced to use ps with -W, while pkill cannot handle Windows processes at all. And I have to use an application, that leavs behind a dangling Java process ...

:)

-- 
Jörg

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]