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

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

Re: [shell-script] soma com shell


From: Luis Alberto Garcia Cipriano
Subject: Re: [shell-script] soma com shell
Date: Sat, 27 Jul 2002 02:02:34 -0300

Diz a lenda que em Mon, 22 Jul 2002 15:40:29 -0300
"rola" <address@hidden> escreveu:
> 
>    Gostaria de saber como efetuo somas em shell
> 
> por exemplo :
> variavel1=12
> 
> variavel2=34
> 
> variavel3=variavel1+variavel2
> 

luis@localhost:~$ v1=2
luis@localhost:~$ v2=3
luis@localhost:~$ v3=$[$v1+$v2]
luis@localhost:~$ echo $v3
5
luis@localhost:~$ :-)

Só não me pergunte as razões. Acabo de ingressar no lucrativo mercado de
shell scripts. O primeiro documento que consumi (e de onde aprendi isso aí)
foi:

http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html#toc10

Abraços,

Luis Alberto.


-- 
          Luis Alberto Garcia Cipriano - address@hidden
      ICQ#30169722 - lagc no canal #debian-br em irc.debian.org
  http://www.google.com/search?q=%22Luis+Alberto+Garcia+Cipriano%22

    Músico amador                              Tradutor solidário
    Jornalista voluntário                 Programador pós-moderno

CIPSGA - Software Livre no Brasil  ->        http://www.cipsga.org.br
Projeto Debian-BR                  ->  http://debian-br.cipsga.org.br


reply via email to

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