Article View: es.comp.os.linux.programacion
Article #11757Re: Un script sencillito...
From: skalvin
Date: Sun, 14 Oct 2001 21:53
Date: Sun, 14 Oct 2001 21:53
30 lines
1683 bytes
1683 bytes
En el art�culo <3BC9FDBB.8020701@yahoo.com>, "Antonio Mu�oz"
<agmunozNOSPAM@yahoo.com> escribi� lo siguiente:
> Buenas!
Hola!
> Prueba a usar esto:
>
> PID="`ps -A | grep esd | cut -c 0-5`"
> if [ -z $PID ]; then
> echo ESD no esta up!
> else
> # Matamos el proceso
> kill -9 $PID
> fi
Probado, ok!
Por xierto, antes de postear, he estado buscando en google y ya hab�a visto algo
con esto:1
PID="`ps -A | grep esd | cut -c 0-5`"
^ ^
y con
if [ -n $PID]
Las dobles comillas, hacen que la variable PID sea un string, no?
Para que sirven las opciones -n y-z ?
Me he quedao con estas dudillas....
gracias!
Technical Details
Message-ID:
<9qd1jf$ng0k1$1@ID-83805.news.dfncis.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!213-4-32-93.uc.nombres.ttd.ES!not-for-mailReferences:
<9qcmhb$muh0f$1@ID-83805.news.dfncis.de> <3BC9FDBB.8020701@yahoo.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,2978759c87390d88 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-10-14 14:54:59 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!213-4-32-93.uc.nombres.ttd.ES!not-for-mail From: "skalvin" <skalvinANTISPAM@antisocial.com> Newsgroups: es.comp.os.linux.programacion Subject: Re: Un script sencillito... Date: Sun, 14 Oct 2001 23:53:56 +0200 Lines: 30 Message-ID: <9qd1jf$ng0k1$1@ID-83805.news.dfncis.de> References: <9qcmhb$muh0f$1@ID-83805.news.dfncis.de> <3BC9FDBB.8020701@yahoo.com> NNTP-Posting-Host: 213-4-32-93.uc.nombres.ttd.es (213.4.32.93) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1003096498 24642177 213.4.32.93 (16 [83805]) X-Orig-Path: not-for-mail User-Agent: Pan/0.9.7 (Unix)