Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2001 14:13:55 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        parv <parv_@yahoo.com>
Cc:        cjclark@alum.mit.edu, f-q <freebsd-questions@FreeBSD.ORG>
Subject:   Re: ps & terminal width sensitivity inside a script 
Message-ID:  <200108172113.f7HLDuR30581@ptavv.es.net>
In-Reply-To: Your message of "Fri, 17 Aug 2001 02:05:14 EDT." <20010817020514.B25092@moo.holy.cow> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Fri, 17 Aug 2001 02:05:14 -0400
> From: parv <parv_@yahoo.com>
> Sender: owner-freebsd-questions@FreeBSD.ORG
> 
> this was, on the fateful occasion around Aug 16 21:59 -0400,
> sent by Crist J. Clark                                               
> >
> > On Thu, Aug 16, 2001 at 07:26:05PM -0400, parv wrote:
> > > why is ps sensitive to terminal width even when used inside a shell
> > > script?
> > 
> > Just 'cause. 
> 
> what a dissapointment! i was expecting little more resonable 
> reasons(s).

OK. Here is something more reasonable (but just a bit).

ps(1) is a very old utility dating at least back to the earliest days of
Unix. (It might even date to Multics, but I can't say for sure.) Back
in the days of Teletypes and big honkin' printers. Back in the days
when teletypes were 80 characters wide and line printers 132
characters wide. Back in the days when there was nothing else.

There was no termcap or terminfo. There were no windows or even
CRTs. Since everything was one or the other, ps(1) was written with
three options, default, w, and ww at 80, 132, and unlimited width,
respectively. Since LOTS of people wrote aliases and shell scripts that
were linked to this hard-coded behavior, the very idea of changing it
was met by screams of protest, so that's where we still are.

The SysV ps(1) started from scratch behaving in a reasonable fashion,
but BSD systems seem forever tied to the bygone days of Teletypes.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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