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

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

Re: [shell-script] Somar números de um arquivo


From: Raul Libório
Subject: Re: [shell-script] Somar números de um arquivo
Date: Mon, 22 Aug 2016 20:05:37 -0300


On Mon, Aug 22, 2016 at 7:57 PM, Gmail address@hidden [shell-script] <address@hidden> wrote:

echo "scale=10; $(sed 's/[Aa-zZ]//g;s/ //g' file.txt | paste -s -d+) 0" | bc


Amigo, na hora eu pensei em fazer mesmo usando o paste, mas deu um branco na sintaxe de jogar o +. Usei o tr e funcionou - nesse exemplo enviado pelo nosso colega.
Mas bom saber disso. Nunca peguei essa situação.

Abraço,


Raul Libório
http://rauhmaru.blogspot.com/
openSUSE Member | Linux User #4444581

/etc/httpd/conf.d/ssl.conf:7
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.

reply via email to

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