bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep only knows 80 character lines


From: Stepan Kasal
Subject: Re: grep only knows 80 character lines
Date: Thu, 12 Dec 2002 09:49:56 +0100
User-agent: Mutt/1.2.5.1i

Hello Alex!

> root      3128  0.0  0.0  2304 1308 ?        S    Dec11   0:00 
> /usr/CYEagent/asagentd
> atviws01:/home/atas0003#  ps -aux | egrep asa
> root      3128  0.0  0.0  2304 1308 ?        S    Dec11   0:00 
> /usr/CYEagent/asa

the problem is not in grep.

Program ``ps'' truncates it's output to 80 characters, unless instructed
otherwise.  Use ``ps auxwww'' to get a ``wide'' output.
See ``man ps'' for details.

The confusion comes from the fact that when you run ``ps'' with output
directed to a terminal, it automatically gets the width of that terminal
and adjusts the output width to the width of the terminal.

When you put a pipe after ``ps,'' there is no terminal on the output of
``ps'', so ``ps'' decides to act as if the terminal width was 80.

Hope this brings you back your faith in grep.

Regards,
        Stepan Kasal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]