3 ms·
Most people use bc because the shell does not do floating-point. If bc is harmful, then write ‘echo | awk “END { print $expression }”’ on the back of your hand.
by ttyprintk 5y ago
Most people use bc because the shell does not do floating-point. If bc is harmful, then write ‘echo | awk “END { print $expression }”’ on the back of your hand.
- kps 5y agoksh does floating point. bash started out imitating ksh, but then got distracted and wandered off.
- ttyprintk 5y agoI stand corrected. POSIX apparently never wanted it, but yash, the “most POSIX-compliant in the world” has allowed it as an extension. Also looks like zsh does it—-does that mean bc is obsolete on Mac?