bc is an arbitrary precision calculator language used in shell scripting.
How to assign this result to a shell variable? Input: echo '1+1' | bc -l Output: 2 Attempts: (didn't work) #!bin/…
shell pipe bcI have a backup script on my server which does cron jobs of backups, and sends me a summary of …
bash bcI do something like the following in a Makefile: echo "0.1 + 0.1" | bc (in the real file the numbers are dynamic, of …
bash unix bcbc doesn't like numbers expressed in scientific notation (aka exponential notation). $ echo "3.1e1*2" | bc -l (standard_in) 1: parse error but …
bash numeric floating-accuracy bcThis is the first time I am using bc. I want to calculate the log (base 10) of a number. How …
unix bcI can't figure out why bc tool sometimes ignores the scale option. Here is an example: > echo 'scale=2; 2.777 - 1.4744…
linux bash bcI stumbled over a curious bug, I think: I tried to read "512" as a number to base 6, and output it …
base bc