From owner-freebsd-questions Fri Aug 17 14:14: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id E6A3F37B40F for ; Fri, 17 Aug 2001 14:13:59 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f7HLDuR30581; Fri, 17 Aug 2001 14:13:56 -0700 (PDT) Message-Id: <200108172113.f7HLDuR30581@ptavv.es.net> To: parv Cc: cjclark@alum.mit.edu, f-q Subject: Re: ps & terminal width sensitivity inside a script In-reply-to: Your message of "Fri, 17 Aug 2001 02:05:14 EDT." <20010817020514.B25092@moo.holy.cow> Date: Fri, 17 Aug 2001 14:13:55 -0700 From: "Kevin Oberman" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Fri, 17 Aug 2001 02:05:14 -0400 > From: parv > 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