--000e0cd1196eda5e9d047ed9428c Content-Type: text/plain; charset=ISO-8859-1 On Fri, Feb 5, 2010 at 3:59 AM, John Ydil <john.gendrot / cnsi.fr> wrote: > the linux command is "ip route get {IP address}" > so my command is : system("ip route get #{ipaddress}") but the result of > this, is just true or false. How can I put the result of my command in a > variable ? > > You can use %x( ... ) for this, those parentheses can also be things like brackets or pipes, even @ symbols. So, for example: dir_list x(ls -l) puts "The directory's listing is:" puts dir_list --000e0cd1196eda5e9d047ed9428c--