Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 1995 21:37:14 +0200
From:      Mark Murray <mark@grondar.za>
To:        "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
Cc:        paul@isl.cf.ac.uk, FreeBSD-current@FreeBSD.org
Subject:   Re: ps and grep 
Message-ID:  <199503161937.VAA07123@grunt.grondar.za>

next in thread | raw e-mail | index | archive | help
> > > It really pisses me off when you do ps | grep foo and foo isn't
> > > found because it's really long and ps truncates its output to fit
> > > the screen width so grep never sees it.
> > 
> > Me too. I would also like to 'ps -gaux | less' and see _everything_.
> 
> Looks like a religious issue... if you run a shell that has aliases
> one way to fix this is:

OK, War of the roses it is! ;-)

A lot of UN*X tools behave differently when faced with an output that is not
the terminal. Take a look at "ls" vs "ls | cat". In each case, the output is
tailored to to most likely use of the utility; are you looking at the output
as formatted for human eyes, or formatted for some other processing? _I_
think that the default output should assume that if stdout is the user's
terminal, then it should be truncated, if the output is redirected, let it
all hang out, and let the user figure out an alias to undo this if (s)he
so desires.

M

--
Mark Murray
46 Harvey Rd, Claremont, Cape Town 7700, South Africa
+27 21 61-3768 GMT+0200



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503161937.VAA07123>