The time now is Fri 24 May 2013, 14:28
All times are UTC - 4 |
| Author |
Message |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Mon 23 Jan 2006, 14:41 Post subject:
calculator bc - scientific comandline-calculator |
|
This is a scientific comandline-calculator.
manual:
http://www.gnu.org/software/bc/manual/bc.html
You can run it from the dotpups-menu.
That opens a yellow xterm, simply enter
2+2
there.
Download (48 kb)
http://dotpups.de/dotpups/System_Utilities/bc-calculator.pup
It requires libreadline4, if you don't have it yet, get it here:
http://noforum.de/dotpups/libreadline-so-4.pup (82 kb)
Mark
|
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Mon 23 Jan 2006, 23:36 Post subject:
|
|
i have a BC and DC package on my dotpups page
* BC is a language that supports arbitrary precision numbers with interactive execution of statements. There are some similarities in the syntax to the C programming language.
* DC is a reverse-polish desk calculator which supports unlimited precision arithmetic. It also allows you to define and call macros.
now you have a choice of packages (but my package is just the command line utilities)
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Mon 23 Jan 2006, 23:40 Post subject:
|
|
oh, I did not check that
Mark
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6866 Location: Perth, Western Australia
|
Posted: Tue 24 Jan 2006, 21:20 Post subject:
|
|
dc is already in puppy.
comes with busybox.
|
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Tue 24 Jan 2006, 22:03 Post subject:
|
|
| Quote: | dc is already in puppy.
comes with busybox. |
yes, i know that .. but this is the FULL version, there is a difference
i like DC because it reminds me of HP calculators and Forth
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6866 Location: Perth, Western Australia
|
Posted: Wed 25 Jan 2006, 04:44 Post subject:
|
|
Ah yes, I bought an HP-45 when I was a student.
I was the only one in the class with a electronic calculator.
Before that I used a slide rule.
|
|
Back to top
|
|
 |
postfs1

Joined: 27 Mar 2010 Posts: 831
|
Posted: Tue 07 Aug 2012, 14:18 Post subject:
|
|
PI
| Code: | | printf "%.9f\n" "`Calculator="103993/33102" ; echo "scale=10; $Calculator"|bc`" |
Edit:
| Code: | | printf "%.9f\n" "`Calculator=\"103993/33102\" ; echo \"scale=10; $Calculator\"|bc`" |
| Description |
Quirky Linux - 1.40 |
| Filesize |
88.3 KB |
| Viewed |
440 Time(s) |

|
_________________
- I don't know why laboratories are named a hospitals.
- The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.
Last edited by postfs1 on Tue 07 Aug 2012, 22:04; edited 2 times in total
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1722 Location: Burghaslach, Germany
|
Posted: Tue 07 Aug 2012, 15:16 Post subject:
|
|
| postfs1 wrote: | PI
| Code: | | printf "%.9f\n" "`Calculator="103993/33102" ; echo "scale=10; $Calculator"|bc`" |
|
| my console answered and wrote: | bash: printf: 3.1415926530: invalid number
0,000000000
# |
| my console wrote: | # echo "scale=10; 103993/33102" | bc
3.1415926530
#
# echo "scale=99; 103993/33102" | bc
3.141592653011902604072261494773729684007008639961331641592653011902604072261494773729684007008639961
# |
---------------------------------------
edit
Note, my post was not about precision of PI but only demonstrating a calculation without error messages
Last edited by L18L on Thu 09 Aug 2012, 16:13; edited 1 time in total
|
|
Back to top
|
|
 |
Burunduk
Joined: 21 Aug 2011 Posts: 52
|
Posted: Tue 07 Aug 2012, 17:42 Post subject:
|
|
https://en.wikipedia.org/wiki/Bc_programming_language#Calculating_Pi_to_10000_places
| Code: | | echo "scale=100; 4*a(1)" | bc -l |
-----
http://x-bc.sourceforge.net/extensions_bc.html
| Quote: | | - contains functions of trigonometry, exponential functions, functions of number theory and some mathematical constants... |
|
|
Back to top
|
|
 |
postfs1

Joined: 27 Mar 2010 Posts: 831
|
Posted: Tue 07 Aug 2012, 22:06 Post subject:
|
|
| Code: | | printf "%.9f\n" "`echo -e 'scale\nscale=20\n4*a(1)'|bc -l`" |
!ATTENTION! ===>
http://en.wikipedia.org/wiki/Rounding#Round-to-even_method
| Code: | | printf "%.1f\n" "74.35" |
Gives: 74.3
Sometimes must be: 74.3
Sometimes must be: 74.4 #Round half to even
| Code: | | printf "%.1f\n" "74.25" |
Gives: 74.2
Sometimes must be: 74.2 #Round half to even
Sometimes must be: 74.3
   
http://brskari.wordpress.com/2011/04/23/rounding-values-in-bc/
_________________
- I don't know why laboratories are named a hospitals.
- The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.
|
|
Back to top
|
|
 |
Burunduk
Joined: 21 Aug 2011 Posts: 52
|
Posted: Wed 08 Aug 2012, 10:56 Post subject:
|
|
Lots of functions here: http://phodd.net/gnu-bc/
Download funcs.bc
| Code: | | echo "round(4.35,.1)" | bc -l /path/to/funcs.bc |
Results in 4.4 (round half up)
-----
| L18L's console wrote: | | bash: printf: 3.1415926530: invalid number |
3.14 is invalid number... in Germany (for printf but not for bc): 3,14 or LANG=C ist gut!
|
|
Back to top
|
|
 |
postfs1

Joined: 27 Mar 2010 Posts: 831
|
Posted: Wed 08 Aug 2012, 13:20 Post subject:
|
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rounding ===>
echo 'round(1731.543534, .001)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1731.544
echo 'round(1731.548534, .001)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1731.549
echo 'round(1731.543534, 1)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1732
echo 'round(1732.543534, 1)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1733
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
echo 'round(1731.543534, .002)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1731.544
echo 'round(1731.548534, .002)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1731.548
echo 'round(1731.543534, 2)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1732
echo 'round(1732.548534, 2)'|bc -l /archive/Command_Line_Calculator--bc/code/funcs.bc
#OUTPUT: 1732
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_________________
- I don't know why laboratories are named a hospitals.
- The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.
|
|
Back to top
|
|
 |
postfs1

Joined: 27 Mar 2010 Posts: 831
|
Posted: Thu 09 Aug 2012, 04:59 Post subject:
|
|
| Quote: |
Install_functions_for_Calculator--bc.sh
| Code: |
#!/bin/bash
#
#SRC: http://phodd.net/gnu-bc/phodd.net-gnu-bc-201206232000+pdb+html.zip
#
mkdir -p /usr/share/bc ;
cd /usr/share/bc ;
curl -C - -O file:///mnt/sr0/Y2012-M08-D09/Programs_for_Quirky-Linux-1.40/Packed_files/Command_Line_Calculator--bc/phodd.net-gnu-bc-201206232000+pdb+html.zip ;
unzip -j phodd.net-gnu-bc-201206232000+pdb+html.zip code/funcs.bc ;
rm /usr/share/bc/phodd.net-gnu-bc-201206232000+pdb+html.zip ;
#
#
#RESULT: bc -l /usr/share/bc/funcs.bc
|
Edit: 2012, aug 18.
|
Theme(not a question): "Round half to even" rounding, isn't it?
| Quote: |
9970/1048576=.01
| Code: |
echo 'round('"`echo "scale=25 ; 9970/1048576"|bc -l /usr/share/bc/funcs.bc|tee /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 25|sed "s/[0-46-9]/.000000000000000000000001/"|sed "s/5/.000000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 24|sed "s/[0-46-9]/.00000000000000000000001/"|sed "s/5/.00000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 23|sed "s/[0-46-9]/.0000000000000000000001/"|sed "s/5/.0000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 22|sed "s/[0-46-9]/.000000000000000000001/"|sed "s/5/.000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 21|sed "s/[0-46-9]/.00000000000000000001/"|sed "s/5/.00000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 20|sed "s/[0-46-9]/.0000000000000000001/"|sed "s/5/.0000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 19|sed "s/[0-46-9]/.000000000000000001/"|sed "s/5/.000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 18|sed "s/[0-46-9]/.00000000000000001/"|sed "s/5/.00000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 17|sed "s/[0-46-9]/.0000000000000001/"|sed "s/5/.0000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 16|sed "s/[0-46-9]/.000000000000001/"|sed "s/5/.000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 15|sed "s/[0-46-9]/.00000000000001/"|sed "s/5/.00000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 14|sed "s/[0-46-9]/.0000000000001/"|sed "s/5/.0000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 13|sed "s/[0-46-9]/.000000000001/"|sed "s/5/.000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 12|sed "s/[0-46-9]/.00000000001/"|sed "s/5/.00000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 11|sed "s/[0-46-9]/.0000000001/"|sed "s/5/.0000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 10|sed "s/[0-46-9]/.000000001/"|sed "s/5/.000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 9|sed "s/[0-46-9]/.00000001/"|sed "s/5/.00000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 8|sed "s/[0-46-9]/.0000001/"|sed "s/5/.0000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 7|sed "s/[0-46-9]/.000001/"|sed "s/5/.000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 6|sed "s/[0-46-9]/.00001/"|sed "s/5/.00002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 5|sed "s/[0-46-9]/.0001/"|sed "s/5/.0002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 4|sed "s/[0-46-9]/.001/"|sed "s/5/.002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 3|sed "s/[0-46-9]/.01/"|sed "s/5/.02/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
rm /var/tmp/.bc
|
Edit: 2012, aug 11.
|
| Quote: |
PI=3.14
| Code: |
echo -n >/var/tmp/.bc ;
echo 'round('"`echo -e "scale\nscale=26\n4*a(1)"|bc -l /usr/share/bc/funcs.bc|tail -n 1|tee /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 26|sed "s/[0-46-9]/.0000000000000000000000001/"|sed "s/5/.0000000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 25|sed "s/[0-46-9]/.000000000000000000000001/"|sed "s/5/.000000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 24|sed "s/[0-46-9]/.00000000000000000000001/"|sed "s/5/.00000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 23|sed "s/[0-46-9]/.0000000000000000000001/"|sed "s/5/.0000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 22|sed "s/[0-46-9]/.000000000000000000001/"|sed "s/5/.000000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 21|sed "s/[0-46-9]/.00000000000000000001/"|sed "s/5/.00000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 20|sed "s/[0-46-9]/.0000000000000000001/"|sed "s/5/.0000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 19|sed "s/[0-46-9]/.000000000000000001/"|sed "s/5/.000000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
#
#
#
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 18|sed "s/[0-46-9]/.00000000000000001/"|sed "s/5/.00000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 17|sed "s/[0-46-9]/.0000000000000001/"|sed "s/5/.0000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 16|sed "s/[0-46-9]/.000000000000001/"|sed "s/5/.000000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 15|sed "s/[0-46-9]/.00000000000001/"|sed "s/5/.00000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 14|sed "s/[0-46-9]/.0000000000001/"|sed "s/5/.0000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 13|sed "s/[0-46-9]/.000000000001/"|sed "s/5/.000000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 12|sed "s/[0-46-9]/.00000000001/"|sed "s/5/.00000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 11|sed "s/[0-46-9]/.0000000001/"|sed "s/5/.0000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
#
#
#
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 10|sed "s/[0-46-9]/.000000001/"|sed "s/5/.000000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 9|sed "s/[0-46-9]/.00000001/"|sed "s/5/.00000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 8|sed "s/[0-46-9]/.0000001/"|sed "s/5/.0000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 7|sed "s/[0-46-9]/.000001/"|sed "s/5/.000002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 6|sed "s/[0-46-9]/.00001/"|sed "s/5/.00002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 5|sed "s/[0-46-9]/.0001/"|sed "s/5/.0002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 4|sed "s/[0-46-9]/.001/"|sed "s/5/.002/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
echo 'round('"`cat /var/tmp/.bc`"', '"`cat /var/tmp/.bc|cut -d. -f2-|cut -c 3|sed "s/[0-46-9]/.01/"|sed "s/5/.02/"`"')' |bc -l /usr/share/bc/funcs.bc|cat|tee /var/tmp/.bc ;
rm /var/tmp/.bc
#
#
#
|
Edit: 2012, aug 11.
|
A script's content can be copied into text editor by means of <Quote> mode.
_________________
- I don't know why laboratories are named a hospitals.
- The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|