Bash script: specify bc output number format
Posted
by Andrey Kazak
on Stack Overflow
See other posts from Stack Overflow
or by Andrey Kazak
Published on 2010-06-03T11:20:41Z
Indexed on
2010/06/03
11:24 UTC
Read the original article
Hit count: 340
Greetings!
I uses b? to make some calculations in my script. For example:
bc
scale=6
1/2
.500000
For further usage in my script I need "0.500000" insted of ".500000".
Could you help me please to configure bc output number format for my case?
© Stack Overflow or respective owner