[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ajuda em Bash
From: |
Junior |
Subject: |
Ajuda em Bash |
Date: |
Mon, 06 Nov 2000 14:24:13 -0200 |
Tenho os seguintes scripts...
file-1.pl
file-2.pl
file-3.pl
file-4.pl
file-5.pl
file-6.pl
file-7.pl
file-8.pl
so que preciso desses scripts rodando sem parar entao estou tentando
fazer um script em bash e deixa-lo no cron
para verificar se o servido esta rodando ou nao...
#!/bin/bash
for ((i=1; i<9; i++))
do
x=`ps -ef | grep file-$i | grep -v grep | wc -l`;
if ($x eq 0) then
#inicia o servico
fi
done;
o meu problema esta no if alguem pode me ajudar ???
obs sou iniciante ok???
--
/*
If it happens once, it's a bug.
If it happens twice, it's a feature.
If it happens more than twice, it's windows.
*/