Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For one-off simple calculations I just use awk, with this handy function in my .bashrc:

  function calc() { awk "BEGIN{print $*}"; }
  
  # usage in bash
  $ calc 'sqrt(25) + 2**3 - 17.17'
  -4.17


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: