# Console truncates system call returns ....?

**URL:** <https://www.ruby-forum.com/t/console-truncates-system-call-returns/163382>\
**Category:** Rails\
**Created:** [March 19, 2009, 7:19pm UTC](https://www.ruby-forum.com/t/console-truncates-system-call-returns/163382 "2009-03-19T19:19:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![soroe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@soroe](https://www.ruby-forum.com/u/soroe)\
**Post date:** [March 19, 2009, 7:19pm UTC](https://www.ruby-forum.com/t/console-truncates-system-call-returns/163382/1 "2009-03-19T19:19:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![soroe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@soroe](https://www.ruby-forum.com/u/soroe)\
**Post date:** [March 19, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/console-truncates-system-call-returns/163382/2 "2009-03-19T20:14:57Z")

</div>

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](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![soroe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@soroe](https://www.ruby-forum.com/u/soroe)\
**Post date:** [March 19, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/console-truncates-system-call-returns/163382/3 "2009-03-19T20:37:30Z")

</div>

Thanks Rob, that did the trick!

Sonny.
