public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony E. Caudel" <acaudel@gt.rr.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] OT: bash & decimal/exponential numbers math...
Date: Sat, 26 Nov 2005 16:29:25 -0600	[thread overview]
Message-ID: <4388E1C5.7080101@gt.rr.com> (raw)
In-Reply-To: <21449.1132659142@www39.gmx.net>

jarry@gmx.net wrote:
> Hi,
> 
> I wrote a short script for simple text file processing in bash
> (using "<" for input redirection and "read"). I know, there are

<snip>

> Now what to do? Are there some functions, which would implement basic
> math with real numbers in bash (add, substract, multiply, divide
> and round would be enough)?
> The idea of writing them myself really scares me...
> 
> Jarry
> 

Lots of way to do math from command line.  Check out

bc

dc

even python (echo "print (10E3-123)/123" | python

-- 
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
-- 
gentoo-user@gentoo.org mailing list



      reply	other threads:[~2005-11-26 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22 11:32 [gentoo-user] OT: bash & decimal/exponential numbers math jarry
2005-11-26 22:29 ` Anthony E. Caudel [this message]

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=4388E1C5.7080101@gt.rr.com \
    --to=acaudel@gt.rr.com \
    --cc=gentoo-user@lists.gentoo.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox