Article View: es.comp.os.linux.programacion
Article #16161Re: Generar un número con el Bash
From: Esteban
Date: Sat, 06 May 2000 00:00
Date: Sat, 06 May 2000 00:00
43 lines
1821 bytes
1821 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Esteban <scandisk@ctv.es> escribi�: >>#!/bin/bash >># or /bin/ksh but not /bin/sh >>typeset -i num >>IFS="," >>let total=0 >>grep -i Hipercor file |(\ >>while read foo bar num >>do >> echo "$num" >> let total=$total+$num >>done >>echo $total >>) Para no ir dando las gracias a todos los que me habeis contestado a mis preguntas sobre el bash y cargar las news, las doy aqu� en general. GRACIAS A TODOS. - -- 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 iD4DBQE5E2P7a3aqF90Ua+oRAgVoAJdR75P0d7CHB4VeHPjhg7ciP94VAJ9/I9Eo HRHcNj3zec+BkXqli9QmOg== =ITvy -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<slrn8h6ovs.1vu.scandisk@localhost.localdomain>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<slrn8h372p.1cf.scandisk@localhost.localdomain> <8esjh4$7f4$1@news.unizar.es> <slrn8h3so7.1s2.scandisk@localhost.localdomain> <8eu88s$5ip$1@news.unizar.es> <slrn8h6ep5.49s.scandisk@localhost.localdomain>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,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/06 Message-ID: <slrn8h6ovs.1vu.scandisk@localhost.localdomain> X-Deja-AN: 619800371 Content-Transfer-Encoding: 8bit References: <slrn8h372p.1cf.scandisk@localhost.localdomain> <8esjh4$7f4$1@news.unizar.es> <slrn8h3so7.1s2.scandisk@localhost.localdomain> <8eu88s$5ip$1@news.unizar.es> <slrn8h6ep5.49s.scandisk@localhost.localdomain> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@news.wanadoo.es X-Trace: m2newsread.uni2.es 957571826 212.25.134.171 (Sat, 06 May 2000 02:10:26 MET DST) Organization: CTV-JET@Uni2 Mime-Version: 1.0 User-Agent: slrn/0.9.6.2 (Linux) Reply-To: scandisk@ctv.es NNTP-Posting-Date: Sat, 06 May 2000 02:10:26 MET DST Newsgroups: es.comp.os.linux.programacion