ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Russu V.F." <ruwa@psrp.te.ru>
To: "mandrake-russian-admin@altlinux.ru" <mandrake-russian@altlinux.ru>
Subject: Re[2]: [mdk-re] óÕÍÍÉÒÏ×ÁÎÉÅ ÐÏÔÏËÁ ÞÉÓÅÌ
Date: Wed Oct 31 07:05:01 2001
Message-ID: <172604616182.20011031091017@psrp.te.ru> (raw)
In-Reply-To: <20011030202815.A10509@home-pool4-65.com2com.ru>

Hello mandrake-russian-admin,

Tuesday, October 30, 2001, 10:28:15 PM, you wrote:

> On Tue, Oct 30, 2001 at 07:44:00PM +0300, Pankratov Artem wrote:
>> Здраствуйте,
>> 
>> Имеется следующая проблема: ряд чисел который выводит скрипт,
>> как получить сумму этих чисел?

> s=0; 
> for i in `echo "1 2 3 4"`; 
> do 
>     s=$((s + i));
> done 
> echo $s

или к примеру так (в файле summa.log в столбец идут цыфры которые мне надо
суммировать)

sum=0;
for i in `cat ./summa.log `; do
 sum=`expr ${sum} + ${i}`;
done;
echo $sum


-- 
 ОП ТюменьЭнергоСпецРемонт
 Системный администратор
 Руссу В.Ф.                  e-mail: ruwa@psrp.te.ru
                             phone: (3462)76-40-56





  reply	other threads:[~2001-10-31  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-30 19:41 [mdk-re] Суммирование потока чисел Pankratov Artem
2001-10-30 20:24 ` Yura Zotov
2001-10-31  7:05   ` Russu V.F. [this message]
2001-10-30 22:01 ` Aristarh
2001-10-30 23:13 ` Henri Bourbon
2001-10-31 12:27 ` Ihar Viarheichyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172604616182.20011031091017@psrp.te.ru \
    --to=ruwa@psrp.te.ru \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git