[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Substitui��o de variaveis
From: |
moysespr |
Subject: |
Re: [shell-script] Substituição de variaveis |
Date: |
Thu, 1 Sep 2005 07:19:05 -0700 (PDT) |
Genericamente, vê se assim não fica mais versátil:
$ cat credito
2
3
$ soma(){ t=0;while read x;do t=$(($t+$x));done<$1;echo $t;}
$ creditotal=$(soma credito)
$ echo creditotal=$creditotal
creditotal=5
Please, no thanks!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com