From: Bill Kelly Date: 2005-11-28T04:08:45+09:00 Subject: Re: backtick with variables? Hi, From: > >I want to run an external command and capture the output. > > hosts =`net view` > > will store the results from running net view (XP command to list > machines on network) in a string called hosts. > > How do I execute a command stored in a string and capture its output > though? cmd = "net view" hosts = `#{cmd}` There's also popen() if you would prefer to read the output from a pipe. Regards, Bill