Created
June 28, 2009 10:31
-
-
Save cyberfox/137231 to your computer and use it in GitHub Desktop.
A cool little, super-simple, shell script for doing calculations.
This file contains 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
# Tried to twitter this; FAIL. | |
$ cat > calc | |
#!/bin/env ruby | |
p eval(ARGV[0]) | |
^D | |
$ chmod a+x calc | |
$ ./calc 4*Math::PI | |
$ ./calc "Math::sqrt(15241578750190521)" | |
$ ./calc 24*7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment