You may be using bc command in command line for calculations. It can also be used for batch mode calculations as explained below.
Syntax
bc [-c] [-l] [file]
To perform addition using bc command
Another way of executing bc calculation
Syntax
bc [-c] [-l] [file]
To perform addition using bc command
echo "56.8 + 77.7" | bcAnother way of executing bc calculation
bc <<< 4+2Let say you want to convert decimal to hexadecimal, you can do this.
echo "obase=16; ibase=10; 56" | bcA simply way to do calculation with floating point
echo 2/5 | bc -l
No comments:
Post a Comment