🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Bash

#12163
From: Francisco F. Artese
Date: Mon, 20 Aug 2001 19:35
45 lines
2516 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Claudio S. Suarez <claudio@ningun.sitio.es> escribi�:
> El Sat, 18 Aug 2001 19:31:42 -0300, Francisco F. Artese escribi�:

>>PD: Es imposible entonces en bash hacer 299.39 + 2.45 ????

> La shell est�ndar solo trabaja con enteros, que yo sepa.
> Creo que la C-shell (sch) si trabaja con decimales, pero
> no te se decir fijo. Habr�a que mirar en la p�gina de manual.

> Pero si se pueden hacer cuentas de la precision que se te antoje,
> usando el bc.

> Si quieres incluirlo en un script:

> echo "299.39 + 2.45" | bc

> O para guardar el resultado en una variable:

> RESULTADO=`echo "299.39 + 2.45" | bc`

Maravilloso!!!, eso complemente perfectamente a bash en lo que a coma
flotante se refiere.

Te debo las birras ;-)))

Saludos

- -- 
 Si algo puede fallar, fallar� (Murphy).
==============================================================
   Francisco F. Artese - Linux user #174223 - ICQ #17693614
            Linux Debian Potato 2.2 and IceWM 1.0.3
	         LAS MALVINAS SON ARGENTINAS!
==============================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7gWZzkdq1r8MtrroRAqp7AKDURL9O6Ngceh9k2phO4HwKMGeBFQCfYdwl
XDlggj/UaG/zz4gcaMakOkE=
=zzKg
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <kporl9.l02.ln@127.0.0.1>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!ppp-198-88.movi.com.AR!not-for-mail
References: <hj97l9.p7j.ln@127.0.0.1> <slrn9nj7i2.b7.claudio@cacho.celta> <rgehl9.4u3.ln@127.0.0.1> <etfil9.tb.ln@127.0.0.1> <ulcjl9.8v1.ln@127.0.0.1> <slrn9nt9pt.82.claudio@cacho.celta> <ecqml9.rk7.ln@127.0.0.1> <slrn9nvqki.um.claudio@cacho.celta>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,9df979b8f9cb249b
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-08-20 13:37:58 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!ppp-198-88.movi.com.AR!not-for-mail
From: "Francisco F. Artese" <frank@artese.com.ar>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Bash
Date: Mon, 20 Aug 2001 16:35:16 -0300
Lines: 45
Message-ID: <kporl9.l02.ln@127.0.0.1>
References: <hj97l9.p7j.ln@127.0.0.1> <slrn9nj7i2.b7.claudio@cacho.celta> <rgehl9.4u3.ln@127.0.0.1> <etfil9.tb.ln@127.0.0.1> <ulcjl9.8v1.ln@127.0.0.1> <slrn9nt9pt.82.claudio@cacho.celta> <ecqml9.rk7.ln@127.0.0.1> <slrn9nvqki.um.claudio@cacho.celta>
NNTP-Posting-Host: ppp-198-88.movi.com.ar (200.49.198.88)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 998339876 11522518 200.49.198.88 (16 [42069])
X-Orig-Path: not-for-mail
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.2.17 (i686))