Re: Piping PS truncates lines?

From: Chris F.A. Johnson (c.fa.johnson_at_rogers.com)
Date: 11/25/03


Date: 25 Nov 2003 22:53:27 GMT

On Tue, 25 Nov 2003 at 21:08 GMT, Wally Sanford wrote:
> I noticed that if I try something like:
>
> ps -ux | sort -rk 3 | head -n 25
>
> or
>
> ps f -e | grep perl
>
> I get back the correct lines, but they are always truncated to 80 lines?
 
     I think you mean "80 columns".

> It seems to me that this is the doing of the ps command (if it thinks
> it's being piped?)

     Do you get long lines when using ps by itself? I doubt it.

> Is there any way to force it to give full lines?

man ps

     Look for -w.

-- 
    Chris F.A. Johnson                        http://cfaj.freeshell.org
    ===================================================================
    My code (if any) in this post is copyright 2003, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License


Relevant Pages

  • Re: redirect to start of file
    ... but this eliminates two external commands from the patch version ... ## COPYRIGHT 2007, Chris F.A. Johnson ... Released under Version 2 of the GNU General Public License ...
    (comp.os.linux.misc)
  • Re: Automagically setting the group when creating a file
    ... chmod g+s directory ... My code in this post is copyright 2003, Chris F.A. Johnson ... and may be copied under the terms of the GNU General Public License ...
    (comp.unix.questions)
  • Re: rename files
    ... My code in this post is copyright 2004, Chris F.A. Johnson ... and may be copied under the terms of the GNU General Public License ...
    (comp.unix.shell)
  • Re: bash
    ... printf "%s\n" A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ... My code in this post is copyright 2003, Chris F.A. Johnson ... and may be copied under the terms of the GNU General Public License ...
    (comp.unix.shell)
  • Re: Fighting SPAM
    ... secure in the knowledge that he will not read ... My code in this post is copyright 2004, Chris F.A. Johnson ... and may be copied under the terms of the GNU General Public License ...
    (comp.os.linux.misc)