delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/10/04:38:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
content-class: urn:content-classes:message
Subject: RE: a try at killall
MIME-Version: 1.0
Date: Mon, 10 Nov 2003 10:37:43 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
Message-ID: <F0D7281DAB048B438E8F5EC4ECEFBDDC174F68@esmail.elsag.de>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: =?iso-8859-1?Q?J=F6rg_Schaible?= <Joerg DOT Schaible AT Elsag-Solutions DOT com>
To: "CygWin" <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id hAA9c0Yt010185

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019