Created
September 24, 2011 20:11
-
-
Save rjungemann/1239798 to your computer and use it in GitHub Desktop.
Math in Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expr '1 + 1' | |
echo $[1 + 1] | |
let variable=1+1 # spaces are illegal | |
echo '6 ^ 10' | bc | |
bc <<< '13 / 5' # use heredoc notation to pass parameters to bc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment