shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

interface ativa ou nao


From: Luiz Antonio Oliveira
Subject: interface ativa ou nao
Date: Sat, 22 Jan 2005 11:27:19 -0300

Estou rodando o seguinte script para saber se a interface esta ativa ou nao..
mas quando nao esta da um erro e nao executa...

ps: tirem o cabo e testem para nao estar ativa. :P

statuseth0=`ifconfig eth0 | grep RUNNING | cut -d " " -f13 > statuseth0.txt`
conteth0=RUNNING
verifeth0=`cat statuseth0.txt`


if [ $verifeth0 == $conteth0 ]; then
        echo "Está Ativo"
fi
if [ $verifeth0 != $conteth0 ]; then
     echo "Não Esta Ativo"       
fi
   
   abraços [']sss
-- 
Luiz Antonio Oliveira 
aka redhate
Linux User #347508
aMSN: address@hidden
Licq: 251384040
Orkut: http://www.orkut.com/Profile.aspx?uid=9590057360348810177
------------------------------------------------------------------
Comunidade GNU\Linux Slackware do Brasil
address@hidden
http://www.slacklife.com.br
http://forum.slacklife.com.br
http://mirror.slacklife.com.br
Orkut: http://www.orkut.com/Community.aspx?cmm=380090
-------------------------------------------------------------------
Grupo de Usuarios Slackware -CE
address@hidden
http://www.slackware-ce.com.br
Orkut: http://www.orkut.com/Community.aspx?cmm=405043


reply via email to

[Prev in Thread] Current Thread [Next in Thread]