Gentoo Archives: gentoo-user

From: "Anthony E. Caudel" <acaudel@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: bash & decimal/exponential numbers math...
Date: Sat, 26 Nov 2005 22:34:14
Message-Id: 4388E1C5.7080101@gt.rr.com
In Reply to: [gentoo-user] OT: bash & decimal/exponential numbers math... by jarry@gmx.net
1 jarry@×××.net wrote:
2 > Hi,
3 >
4 > I wrote a short script for simple text file processing in bash
5 > (using "<" for input redirection and "read"). I know, there are
6
7 <snip>
8
9 > Now what to do? Are there some functions, which would implement basic
10 > math with real numbers in bash (add, substract, multiply, divide
11 > and round would be enough)?
12 > The idea of writing them myself really scares me...
13 >
14 > Jarry
15 >
16
17 Lots of way to do math from command line. Check out
18
19 bc
20
21 dc
22
23 even python (echo "print (10E3-123)/123" | python
24
25 --
26 Those who would give up essential Liberty, to purchase a little temporary
27 Safety, deserve neither Liberty nor Safety.
28 -- Benjamin Franklin
29 --
30 gentoo-user@g.o mailing list