--- layout: page author: Alessandro Luini category-page: advanced category-title: Advanced commands tags: calculator sum add substract divide calculate compute title: bc ---
In computing, bc
is a command in Unix operating systems that can do easy
calculations in the shell.
Usually input are passed using the echo
command and pipes.
The name stands for Basic Calculator.
echo "(12 / 2 - 3) * 3 + 1.5" | bc 10.5
-i
flag
and no parameter.bc -i 1+1 2 (12 / 2 - 3) * 3 + 1.5 10.2 quit