🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Un script sencillito...

#11753
From: skalvin
Date: Sun, 14 Oct 2001 18:45
17 lines
1466 bytes
Hola,
estoy intentando hacer un script para matar en un determinado momento el
demonio esd 
He pensado en  esto:

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

Bueno, el caso es que la condici�n del if  la cumple siempre. Como puedo
hacerlo para que solo entre cuando la variable pid no contenga nada?
De todas formas, fijo que hay alguna forma m�s optimizada de hacerlo....

gracias por la ayuda!
Technical Details
Message-ID: <9qcmhb$muh0f$1@ID-83805.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!213-99-199-97.uc.nombres.ttd.ES!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,2978759c87390d88,start
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-10-14 11:46:07 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!213-99-199-97.uc.nombres.ttd.ES!not-for-mail
From: "skalvin" <skalvinANTISPAM@antisocial.com>
Newsgroups: es.comp.os.linux.programacion
Subject: Un script sencillito...
Date: Sun, 14 Oct 2001 20:45:05 +0200
Lines: 17
Message-ID: <9qcmhb$muh0f$1@ID-83805.news.dfncis.de>
NNTP-Posting-Host: 213-99-199-97.uc.nombres.ttd.es (213.99.199.97)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1003085164 24069135 213.99.199.97 (16 [83805])
X-Orig-Path: not-for-mail
User-Agent: Pan/0.9.7 (Unix)