News for hackers. Stuff that matters.
Re:Integrated command line math by gnosis on Tuesday July 23, 2013 @02:38PM (#6092025)
A little syntactic sugar (in zsh):

  function calc {
    print $1 | bc -l
  }
Then:

  calc "(1+2)*3"
  9
zsh actually comes with its own little calculator:

  zcalc "(1+2)*3"
  1> 9
  2> 
Among other things, it features "full command line editing, including the history of previous calculations".

There are no comments on this comment yet.