From: John Johnson Date: 2006-09-01T01:32:08+09:00 Subject: Re: IO and an encoded email attachment On Thu, 31 Aug 2006 11:26:37 -0400, Jon Leighton wrote: > appears to come down to Ruby treating the base64 encoded attachment > really weirdly when doing IO stuff. > I have this small script (you can ignore the gsub it doesn't make a > difference): > text = $stdin.read.gsub(/([`\$\\"])/, '\\\\\1') > command = 'echo "' + text + '"' > output = `#{command}` This is probably because the echo command is a command that is built into the shell. Try finding an echo program, like this: which echo Then use that with the full path in the command= line. It worked for me after I did that. Regards, JJ -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/