From: Brian Candler Date: 2010-08-10T03:06:22+09:00 Subject: Re: error messages from bash aren't captured by ruby interpreter Bruno Sousa wrote: > out = `rm /var/mail/teste2` > > Errors like "rm: cannot remove `/var/mail/teste2': No such file or > directory" won't be stored in "out" string. > > How can I do that? out = `rm /var/mail/teste2 2>&1` Otherwise look at open3 in the stdlib, if you want to get stdout and stderr separately. -- Posted via http://www.ruby-forum.com/.