From owner-freebsd-questions Wed May 29 5:11:31 2002 Delivered-To: freebsd-questions@freebsd.org Received: from reiher.informatik.uni-wuerzburg.de (wi4d22.informatik.uni-wuerzburg.de [132.187.101.122]) by hub.freebsd.org (Postfix) with ESMTP id BA0FC37B401 for ; Wed, 29 May 2002 05:11:25 -0700 (PDT) Received: by reiher.informatik.uni-wuerzburg.de (Postfix, from userid 1001) id 5163DAF45; Wed, 29 May 2002 14:11:20 +0200 (CEST) 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 Message-ID: <20020529121120.GA68681@reiher.informatik.uni-wuerzburg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i 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 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. --mkb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message