dotfiles/bin/calc

14 lines
164 B
Plaintext
Raw Normal View History

2020-06-03 14:31:58 +00:00
#!/usr/bin/env ruby
#
# Run a quick calculation with Ruby
#
# Usage: calc "1/2"
class Integer
def /(other)
fdiv(other)
end
end
puts eval(ARGV.join(""))