summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdiv8
1 files changed, 8 insertions, 0 deletions
diff --git a/div b/div
new file mode 100755
index 0000000..93585dc
--- /dev/null
+++ b/div
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+
+factor = ARGV[0].to_f
+exit if factor==0
+while line = STDIN.gets
+ puts line.to_f / factor
+end
+