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

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

Re: [shell-script] Somar em bash


From: Gentil de Bortoli Jr
Subject: Re: [shell-script] Somar em bash
Date: Thu, 13 Oct 2005 13:24:53 -0300
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Opa.

paste -s -d "+" Arquivo.txt | bc

ou

echo $(($(paste -s -d "+" teste)))

[]s

Gentil de Bortoli Júnior
KeyID: 0x8383E070 - www.keyserver.net


>>Tenho um arquivo com o seguinte conteúdo:
>>
>>497
>>15
>>31
>>31
>>14
>>14
>>14
>>14
>>14
>>14
>>15
>>
>>Como faço para em shell somar estes números?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDTopVU6AHyoOD4HARAudBAJ9E62VCRVTcBxGFIt5TO3XLUrzzXACgm9lD
zn3ovcn+mtC8BBojiyefgYc=
=sfcP
-----END PGP SIGNATURE-----


reply via email to

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