Console truncates system call returns ....?


#1

Hey Guys,

The following system call (in Ubuntu 8.04) gets the associated result.

$> ps aux | grep myProgram

1000 15152 59.2 1.3 33244 28652 pts/1 S 10:48 0:02 ruby
/home/workplace/fireknife/script/runner -e test ARGV.push 1; require
‘rating_profile.rb’; myProgram.new

However, when I attempt the following command in the console I get a
truncated result:

res = ps aux | grep 15152

1000 15152 59.2 1.3 33244 28652 pts/1 S 10:48 0:02 ruby
/home/workpla\n

If I expand the terminal window, and re-execute in rails console, I get
more of the command string appearing. This isn’t just a display issue,
since the following command in the rails console will yield an empty
result… unless the terminal window is expanded to its maximum width
and really small font…

res = ps aux | grep myProgram

Is there a rails console configuration file I can adjust? Any help
would be appreciated.

Sonny.


#2

On Mar 19, 2009, at 2:19 PM, Sonny C. wrote:

However, when I attempt the following command in the console I get a
since the following command in the rails console will yield an empty
result… unless the terminal window is expanded to its maximum width
and really small font…

res = ps aux | grep myProgram

Is there a rails console configuration file I can adjust? Any help
would be appreciated.

Sonny.

No, but you could expand your options from aux to auxww or use --cols
–columns or --width options to set a width.

-Rob

Rob B. http://agileconsultingllc.com
removed_email_address@domain.invalid


#3

Thanks Rob, that did the trick!

Sonny.