A script to sum all the numbers on stdin (one per line): #!/usr/bin/env ruby puts STDIN.each_line.map(&:to_i).reduce(:+)
-
-
Replying to @recursecenter
@recursecenter I propose `paste -sd+ - | bc` as even shorter.@nelhage can no doubt improve on that.3 replies 1 retweet 6 likes -
Replying to @patrickc1 reply 0 retweets 0 likes
Replying to @recursecenter
@recursecenter @nelhage It's a hollow life that has no time for shell golf.
0 replies
1 retweet
11 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.