Date: Wed, 29 May 2002 14:37:32 +0200 From: Roman Neuhauser <neuhauser@bellavista.cz> To: Matthias Buelow <mkb@informatik.uni-wuerzburg.de> Cc: "Philip J. Koenig" <pjklist@ekahuna.com>, questions@freebsd.org Subject: Re: grep and console width Message-ID: <20020529123732.GE18367@freepuppy.bellavista.cz> In-Reply-To: <20020529121120.GA68681@reiher.informatik.uni-wuerzburg> References: <20020529121120.GA68681@reiher.informatik.uni-wuerzburg>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Wed, 29 May 2002 14:11:20 +0200 > From: Matthias Buelow <mkb@informatik.uni-wuerzburg.de> > To: "Philip J. Koenig" <pjklist@ekahuna.com> > Cc: questions@FreeBSD.ORG, Roman Neuhauser <neuhauser@bellavista.cz> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020529123732.GE18367>