🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #16145

Re: Generar un número con el Bash

#16145
From: Esteban
Date: Thu, 04 May 2000 00:00
40 lines
1877 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

J.A. Gutierrez <spd@daphne.cps.unizar.es> escribi�:

>	egrep -v -e "^$n\$" prueba > prueba.$$ && mv prueba.$$ prueba

Ya casi lo tengo!

Otra cosa:

Tengo hecho un script que me genera un dat del tipo:

registro:1 Comida , Hipercor , 2000

Cuando consulto por hipercor (por ejemplo), el resultado es:

registro:1 Comida , Hipercor , 2000
registro:5 Ordenador, Hipercor , 50000
registro:37 Zapatos , Hipercor , 3000

Como puedo hacer para que me muestre la suma del dinero, algo como:

				Total: 55000

Supongo que es posible con el bash, sin recurrir al awk u otro.

- -- 
Esteban Navarro (User Linux 132409)
Fondos Escritorio: http://www.ctv.es/USERS/scandisk
Clave P�blica E-Mail asunto: PGPKEY

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5EfMFa3aqF90Ua+oRAoreAJ9mtpeyyss8fTc+/gq4g6sP8MpvuACeNXO6
8cSWTLBXC/wkUTRC+YfyZQI=
=Kd2u
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn8h3so7.1s2.scandisk@localhost.localdomain>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8h372p.1cf.scandisk@localhost.localdomain> <8esjh4$7f4$1@news.unizar.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,5491e17dfd7524bc
X-Google-Attributes: gidf86c8,public
From: scandisk@ctv.es (Esteban)
Subject: Re: Generar un número con el Bash
Date: 2000/05/04
Message-ID: <slrn8h3so7.1s2.scandisk@localhost.localdomain>
X-Deja-AN: 619331871
Content-Transfer-Encoding: 8bit
References: <slrn8h372p.1cf.scandisk@localhost.localdomain> <8esjh4$7f4$1@news.unizar.es>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@news.wanadoo.es
X-Trace: m2newsread.uni2.es 957478170 62.36.117.126 (Fri, 05 May 2000 00:09:30 MET DST)
Organization: Wanadoo Usenet News - Visita http://www.wanadoo.es/
Mime-Version: 1.0
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: scandisk@ctv.es
NNTP-Posting-Date: Fri, 05 May 2000 00:09:30 MET DST
Newsgroups: es.comp.os.linux.programacion