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

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

ajuda em variaveis


From: Luiz Carlos Nebenzahl
Subject: ajuda em variaveis
Date: Mon, 15 Jul 2002 11:57:10 -0300

Ola amigos!

Tenho o seguinte fragmento de codigo abaixo. Acontece que eu não estou
conseguindo somar as variaveis $TOTREC+$quarec
Acho que estou errando na sintaxe.
Alguem pode me corrigir?
Agradeço.

TOTREC=0

echo -e "\tUsuario\tRecebidos\tEnviados"
ls "/home/" | while read usu
do
        quanrec=$(cat "/var/log/maillog."$LOG | grep 'to=<'$usu -c)
        quanenv=$(cat "/var/log/maillog."$LOG | grep 'from=<'$usu -c)
        if [ "$quanrec" -ne 0 -a "$quanenv" -ne 0 ]; then
        TOTREC=(($TOTREC+$quarec))
        echo -e "\t"$usu"\t"$quanrec"\t"$quanenv
        fi
echo $TOTREC
done
echo $TOTREC



Luiz Carlos Nebenzahl
RotNet Sistemas e Conectividade



------------------------------------------------------
Mensagem livre de viroses e anexos perigosos!
Serviço Protetor de E-mail da http://www.rotnet.com.br
Suporte a Servidores - address@hidden



reply via email to

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