Try this:
def view
@result = ""
x = `ps -el`
x.each_line do |l|
@result += l + "<br />"
end
return @result
end
I remembered that carriage return is always funny from system to system.
This should work.
Good luck!
jackster the jackle wrote:
> I want to capture the list of running processes on my computer. I am to
> get all the data into my variable with a simple system call:
>
> x = `ps -el`
>
> My problem comes when I want to display the data back out in a legible
> format that makes sense.
>
> What is the best way to do this?
>
> thanks
>
> jackster
--
Posted via http://www.ruby-forum.com/.