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

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

Re: Incrementar variável


From: lferreir1
Subject: Re: Incrementar variável
Date: Thu, 12 Feb 2004 12:21:42 -0000
User-agent: eGroups-EW/0.82

Olá Victor,
Existem n opçoes para isto.
tente assim:
--------------
#!/usr/bin/ksh
#

VALOR=0
while [ $VALOR -ne 100 ]
  do
    VALOR=`expr $VALOR + 1`
done
echo $VALOR
--------------
Até!
Luiz
> Olá pessoal! Sou iniciante em shell e gostaria de saber como faço 
para
> incrementar em 1 o valor de uma variável dentro do laço while ou do 
for.
> Deve ser bem simples, porém não estou conseguindo. Alguém pode me 
dar
> uma força?
> 
> Obrigado!
> 
> Victor


reply via email to

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