[Gllug] Pipes truncating STDOUT to 80 chars

Rhys Hopkins rhys.hopkins at culver-tec.com
Fri Nov 8 17:37:14 UTC 2002


> It's not the pipe that's truncating the output, it's ps. Sounds like
> it's a bug, because it should check if the output is to a terminal
> and use that to decide the format of the output (c.f. ls). 
> Try reporting
> it at http://bugzilla.redhat.com

So if I copy ps from my SuSE box to my Red Hat box.... ?
[furtive copying of binaries...]

> 
> >This is particularly annoying when doing e.g. 
> >
> >What can I change in the RedHat system to make it act like SuSE ?
> 
> You can either force a wide column width:
> 
> 	COLUMNS=1000 ps -ef | grep httpd
> 

I have tried this previously, to no effect.


> or you can just use sane BSD ps syntax:
> 
> 	ps auxww | grep httpd
> 

Sorry - I am from an AIX / HPUX background where such bizarre syntaxes
are unheard of, these things never occur to me.

> Just as an aside... if you're thinking of doing this from 
> within a script,
> don't! Grepping the process table is an unreliable method for 
> finding out
> pretty much anything,

EEEEK! why didn't someone tell me this earlier! I have based my entire
career
on this very technique.

> and there are better alternatives available.


> 
> Tet
> 
> -- 
> Gllug mailing list  -  Gllug at linux.co.uk
> http://list.ftech.net/mailman/listinfo/gllug
> 


***********************************************************************************************************
Visit us at http://www.culver-tec.com

DISCLAIMER & CONFIDENTIALITY NOTICE

This email and any files transmitted with it are confidential and intended solely for the use
of the individual or entity to whom they are addressed.  This communication may contain
privileged material.  If you are not the intended recipient or the person responsible for 
delivering the email to the intended recipient, please be advised that you have received
this email in error and that any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited.

The content of this email and any files transmitted with it may not reflect the views and
opinions of the originating company.  If you have received this email in error, please 
telephone +44 (020) 7456 1300 immediately.
The contents of this email are subject to the terms and conditions of use of our Websites.
No inappropriate content of any sort in this email is approved by us.
If you have any queries or complaints, please forward this email to complaints at culver-tec.com
***********************************************************************************************************


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list