From owner-freebsd-questions Thu May 30 18: 3:23 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by hub.freebsd.org (Postfix) with SMTP id 2C85437B401 for ; Thu, 30 May 2002 18:03:13 -0700 (PDT) Received: (qmail 25996 invoked from network); 31 May 2002 01:02:29 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 31 May 2002 01:02:29 -0000 Received: (from roman@localhost) by freepuppy.bellavista.cz (8.11.6/8.11.6) id g4TCbWM20253; Wed, 29 May 2002 14:37:32 +0200 (CEST) (envelope-from neuhauser@bellavista.cz) X-Authentication-Warning: freepuppy.bellavista.cz: roman set sender to neuhauser@bellavista.cz using -f Date: Wed, 29 May 2002 14:37:32 +0200 From: Roman Neuhauser To: Matthias Buelow Cc: "Philip J. Koenig" , questions@freebsd.org Subject: Re: grep and console width Message-ID: <20020529123732.GE18367@freepuppy.bellavista.cz> Mail-Followup-To: Matthias Buelow , "Philip J. Koenig" , questions@FreeBSD.ORG References: <20020529121120.GA68681@reiher.informatik.uni-wuerzburg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020529121120.GA68681@reiher.informatik.uni-wuerzburg> User-Agent: Mutt/1.3.99i 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: Wed, 29 May 2002 14:11:20 +0200 > From: Matthias Buelow > To: "Philip J. Koenig" > Cc: questions@FreeBSD.ORG, Roman Neuhauser > Subject: Re: grep and console width > > Philip J. Koenig writes: > > >> No. It's not grep, it's ps(1). see the w option. > > > >Wow, so it is. So even if you redirect the output of that command, > >and it never even touches a console window, it formats the output to > >fit the current console window? (or defaults to 80 chars) > > Hmm, IMHO ps should only truncate if stdout is a terminal (that's > the only case where it really makes sense.) The proper Unix way, > of course, would be to not make grep do any assumptions at all, > and have a filter command that truncates to screenwidth, although > that would probably be a bit more effort to use, unless you use > aliases. We're probably seeing some rather old misdesign here. well, grep does *not* make any assumptions. it's really a strange behavior of ps(1), IOW, I agree with you. -- FreeBSD 4.5-STABLE 2:36PM up 1 day, 4:31, 12 users, load averages: 0.02, 0.01, 0.00 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message