Comment

Comment by rnk

I got tired of typing bc -l years ago, I have a function so I can do it on the command line: calc 2^27 + 3^15. I wish somehow the shell would let me add parens here, instead of having to escape them with a quote.

function calc2 { if [ $# -eq 0 ]; then echo 'pass commands for math evaluation, like calc l(2^32/17) + 3'; fi; echo $* | bc -l; }

parent rnk 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton