Skip to content

Instantly share code, notes, and snippets.

@sethk
Last active October 13, 2015 00:52
Show Gist options
  • Save sethk/bb695e1b7bd166cc851b to your computer and use it in GitHub Desktop.
Save sethk/bb695e1b7bd166cc851b to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
while (size = STDIN.gets)
$stderr.puts "Reading #{size} bytes"
size = size.to_i
STDIN.read(size)
$stderr.puts "Read #{size} bytes"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment