Skip to content

Instantly share code, notes, and snippets.

View hmsk's full-sized avatar
🍺
Now Brewing

Kengo Hamasaki hmsk

🍺
Now Brewing
View GitHub Profile
#!/usr/local/bin/ruby
ARGV.each do |f|
read_size = 0
io = File.open f
print "#{f} :\n"
while (s = io.sysread(32768) rescue nil) do
read_size += s.size
STDERR.print "#{read_size} bytes read \r"
end