RE: [Linux] Bir Bash Script Yardımı

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: N.Ersen SISECI (siseci@acikkod.org)
Date: Thu 26 May 2005 - 08:37:34 EEST


Selamlar,

pgrep ile fetchmail in process id sini alip bir degiskene atayip,
bu degiskenin bos olup olmadigini kontrol ederek de yapabilirsiniz.

#!/bin/sh

PID=`pgrep fetchmail`

if [ -z "$PID" ]; then
        fetchmail -d 300 &
fi

Iyi calismalar.

-- 
N. Ersen SISECI
http://www.enderunix.org
http://www.acikkod.org

On Wed, 2005-05-25 at 12:57 +0000, Okan Özeren wrote:

> awk 'BEGIN{ system("ps ax | grep fetchmail"); }' | awk '{ if > ($5!="fetchmail"){ system("fetchmail -d 300 &"); } else{ print $5" sistemde > çalışıyor"; exit; } }' > > fetchmail kurulu olmadığı için deneyemedim ama > çalışır sanırım >

_______________________________________________
Linux mailing list
Linux@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.