1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env ruby `mkfifo #{ARGV[0]}` f = File.new "#{ARGV[0]}", 'w' while line = STDIN.gets f.write line+"\n" f.flush end `rm #{ARGV[0]}`