You can use backticks to capture stdout:
text = `latex -interaction=nonstopmode temp.tex`
Regards,
Sean
Try
output = `latex -interaction=nonstopmode temp.tex`
(note that the symbols above are backticks, not quotation marks)
or dive into popen.
cheers,
Brian
--
http://ruby.brian-schroeder.de/
Stringed instrument chords: http://chordlist.brian-schroeder.de/
open('|latex -interaction=nonstopmode temp.tex') do |stream|
#then maybe...
stream.readlines.each do |line
end
end
See also IO.popen, and others [cf Ruby-Talk:163897]
> 6TooL9
>
>
Hugh
>
Works for me:
$ ruby -e 'test = 42; p `echo "#{test}"`'
"42\n"