summaryrefslogtreecommitdiff
path: root/avg
diff options
context:
space:
mode:
Diffstat (limited to 'avg')
-rwxr-xr-xavg6
1 files changed, 3 insertions, 3 deletions
diff --git a/avg b/avg
index 07e3de9..db5035a 100755
--- a/avg
+++ b/avg
@@ -2,7 +2,7 @@
require 'trollop'
-cfg = Trollop::options do
+conf = Trollop::options do
banner "avg < <one number per line>"
opt :round, "Number of digits after decimal point.", :type => :int, :default => -1
end
@@ -16,8 +16,8 @@ end
avg = sum/i.to_f
-if cfg[:round] >= 0
- puts avg.round cfg[:round]
+if conf[:round] >= 0
+ puts avg.round conf[:round]
else
puts avg
end