From: Venks Date: 2007-11-28T05:58:42+09:00 Subject: How to redirect a "system" standard output to a variable ------=_Part_1839_27223403.1196197116250 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I need to redirect any standard output thrown when using a system call into a Ruby variable. I tried to search for a solution but couldn't find anything that worked. May be I am not using the right search terms. Here is what I am trying to do. begin `rm somefile` end If "somefile" doesn't exist the OS throws the message "rm: cannot remove `somefile': No such file or directory" which I want to capture into a variable. Thanks, ------=_Part_1839_27223403.1196197116250--