summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-01-25 13:35:39 +0100
committerPatrick Simianer <p@simianer.de>2015-01-25 13:35:39 +0100
commit33a248464bd3ac09135e97facf2e7796bc3267ff (patch)
tree90dc3c58186b001c1cd7d72e6002c9a44a6cec4f
parent81f6bed7bd657ecb30a40a792ad7394c80e0a5e9 (diff)
div
-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
+