From owner-freebsd-current Fri Sep 22 11:33:03 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA13267 for current-outgoing; Fri, 22 Sep 1995 11:33:03 -0700 Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id LAA13262 for ; Fri, 22 Sep 1995 11:33:00 -0700 Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id LAA00551; Fri, 22 Sep 1995 11:31:57 -0700 From: "Rodney W. Grimes" Message-Id: <199509221831.LAA00551@GndRsh.aac.dev.com> Subject: Re: from(1) To: wosch@cs.tu-berlin.de (Wolfram Schneider) Date: Fri, 22 Sep 1995 11:31:56 -0700 (PDT) Cc: simonm@dcs.gla.ac.uk, wollman@lcs.mit.edu, current@freebsd.org In-Reply-To: <199509221313.PAA25411@caramba.cs.tu-berlin.de> from "Wolfram Schneider" at Sep 22, 95 03:13:25 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2302 Sender: owner-current@freebsd.org Precedence: bulk > > Simon Marlow writes: > >I disagree entirely. The generality provided by pipes and pipe > >combinators far outweighs the slight performance gain by implementing > >the options directly. How many other programs are you going to add > >'-c' to? What about the programs where '-c' is already taken, and you > >have to use an inconsistent flag? > > grep have already '-c'. I add -c to locate. It is a real difference > between 13MB I/O or 115MB. grep should not have the -c option. > > >A valid point, but this is a shell problem and not worth sacrificing > >the philosophy of an operating system for. > > ^philosophy^religion Go read some of the old Bell labs papers and rethink that, unix does have a philosophy, and this point is one of them! Small simple programs that act as filters and are strung togeather with pipes and shell scripts was the very thing that Unix was when it was designed. Too bad so many folks have lost sight of the elegance that really is :-(. > Do you want remove 'z' flag from tar because > > $ tar cfvz - files ... > x.tgz break old unix philosophy? Yes, because it gives me no control over the level of gzip compression or other gzip glags when you do it that way. IMHO, and I am on record with this in some of the freebsd lists long ago, way way way too many options have proliferated through out the source. tar having a z option is defanitly one of them! Programs that have options in them that cause there input or output to be filtered by execing another program are brain dead. You either have to add all the options of the other program or you have to suffer from inflexibility :-(. I think the basic reasoning of these ``optimizations'' is to make things faster, well, attack the more general problem so that ALL things can be faster, fix pipe I/O bandwidth :-). SkyRsh# dd if=/dev/zero bs=8192 count=1024 | dd of=/dev/null 1024+0 records in 1024+0 records out 8388608 bytes transferred in 3 secs (2796202 bytes/sec) SkyRsh# dd if=/dev/zero bs=8192 count=1024 >/dev/null 1024+0 records in 1024+0 records out 8388608 bytes transferred in 1 secs (8388608 bytes/sec) Pipes are slow :-(. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD