On 21 February 2011 02:06, Nop <nooo...@googlemail.com> wrote:
> whether i use system("octave","/usr/bin") or
> system("octave"), it will return "true", telling me that the
> application was successfully executed.
> I can't convert the output to string, either.
>
> What are your recommendations to grab the output from an application?

An alternative method of calling system commands is the back-tick - on
my keyboard, it's on the key above tab, next to "1".
As an example, I have used it to return the value of a mount command
to see whether a particular mount point is attached:

device_path = `mount | grep /media/backups`.split(" ").first

HTH

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to