[ale] Line truncation in a terminal....

Danny Cox danscox at mindspring.com
Wed Oct 2 08:17:12 EDT 2002


John,

On Wed, 2002-10-02 at 08:03, John Wells wrote:
> If I do a "ps -ef", the lines returned span the entire width of my current
> terminal.
> 
> However, if I do a "ps -ef | grep something", the resulting lines truncate
> at around 63 characters.
> 
> Another problem is that, in the first case, if the line goes beyond what
> my terminal can display, it *doesn't* wrap....I just can't see those
> lines.
> 
> What explains the difference in behavior here, and what can I change to
> control it?  I'm assuming it's based on TERM setting, but would like some
> more info...

	The culprit (mostly) this time is ps itself.  It's "smart" about your
terminal line size.  Of course, smart can appear to be very dumb
sometimes....

	On my system (RH 7.2), ps efww gives me long lines that ignore the
terminal line length.  "ps -ef | grep ." gives me the same: full width
of the terminal.  I think it uses the "COLUMNS environment variable,
which is set to the width of the term.

	I can't explain the 63 char problem going through grep, sorry.

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list