>>>>> "D" == Dave Thomas <Dave / thomases.com> writes:

D>     puts "begin 644 file"
D>     while gets
D>       print [$_].pack("u")
D>     end
D>     puts "end"

 Try :

pigeon% cat b.rb
#!/usr/bin/ruby
puts "begin 644 #{ARGV[0]}"
while line = $stdin.read(45)
   print [line].pack "u"
end
puts "`\nend"
pigeon% 

pigeon% b.rb file < hello
begin 644 file
,:&5L;&\*:&5L;&\*
`
end
pigeon% 



Guy Decoux