🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #11664

Re: Un script sencillito...

#11664
From: Mario Teijeiro Otero
Date: Mon, 15 Oct 2001 19:07
28 lines
1477 bytes
skalvin wrote:

> 
> 
> PID="`ps -A | grep esd | cut -c 0-5`"
> if��[�$PID!=""�]���;�then
> #�Matamos�el�proceso
> kill�-9�$PID
> else�echo�ESD�no�esta�up&running!
> fi
> 

un truco que hacen en los scripts de redhat es:

,----[  ]
| if [ "a$PID" != "a" ]; then
| ....
| 
`----

Por cierto, hay un programa llamado killall

Saludos
-- 
"Yo uso software libre" (declaraci�n a petici�n de Richard M. Stallman)

Mario Teijeiro Otero (emeteo) mailto: mteijeiro at escomposlinux dot org
clave: correo con Asunto: "[PGPKEY]"     Usr. Reg. 122438               
Technical Details
Message-ID: <a5cfq9.ds1.ln@asimovi.localdomain>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.cwix.com!newsfeed.bcn.ttd.net!news.mad.ttd.net!asimovi.localdomain!nobody
References: <9qcmhb$muh0f$1@ID-83805.news.dfncis.de>

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-15 12:28:51 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.cwix.com!newsfeed.bcn.ttd.net!news.mad.ttd.net!asimovi.localdomain!nobody
From: Mario Teijeiro Otero <emeteo@escomposlinux.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Un script sencillito...
Date: Mon, 15 Oct 2001 21:07:22 +0200
Organization: Telefonica Transmision de Datos
Lines: 28
Message-ID: <a5cfq9.ds1.ln@asimovi.localdomain>
References: <9qcmhb$muh0f$1@ID-83805.news.dfncis.de>
NNTP-Posting-Host: 212-170-163-182.uc.nombres.ttd.es
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
User-Agent: KNode/0.7.0