Skip to content

Instantly share code, notes, and snippets.

@waldekmastykarz
Created June 23, 2021 11:34
Show Gist options
  • Save waldekmastykarz/6646a459bdf2b01d42e9711b47dffbce to your computer and use it in GitHub Desktop.
Save waldekmastykarz/6646a459bdf2b01d42e9711b47dffbce to your computer and use it in GitHub Desktop.
Calculator in zsh
# usage:
# $ = "1+2"
# 3
# quotes are necessary only for some expressions like *, but better to use them all the time just to be safe
function = {
echo "$1" | bc -l
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment