From owner-freebsd-questions@FreeBSD.ORG Mon Jul 7 15:06:24 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 221E1EED for ; Mon, 7 Jul 2014 15:06:24 +0000 (UTC) Received: from blue.qeng-ho.org (blue.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC59B2F0C for ; Mon, 7 Jul 2014 15:06:23 +0000 (UTC) Received: from fileserver.home.qeng-ho.org (localhost [127.0.0.1]) by fileserver.home.qeng-ho.org (8.14.7/8.14.5) with ESMTP id s67F6JG8004608; Mon, 7 Jul 2014 16:06:19 +0100 (BST) (envelope-from freebsd@qeng-ho.org) Message-ID: <53BAB76B.2020203@qeng-ho.org> Date: Mon, 07 Jul 2014 16:06:19 +0100 From: Arthur Chance User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Polytropon Subject: Re: The name "grep" References: <20140707075443.d47ca06a.freebsd@edvax.de> <53BA4F77.60907@qeng-ho.org> <20140707104403.5a0694ff.freebsd@edvax.de> <53BA71A7.9040208@qeng-ho.org> <1404728392.19389.1.camel@archlinux> <53BA9EC0.9000201@qeng-ho.org> <20140707160528.7ecf9855.freebsd@edvax.de> In-Reply-To: <20140707160528.7ecf9855.freebsd@edvax.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 15:06:24 -0000 On 07/07/2014 15:05, Polytropon wrote: > On Mon, 07 Jul 2014 14:21:04 +0100, Arthur Chance wrote: >> On 07/07/2014 11:19, Ralf Mardorf wrote: >>> On Mon, 2014-07-07 at 11:08 +0100, Arthur Chance wrote: >>>> It's of historical interest, but 30+ years down the line >>> >>> It still matters as a mnemonic. Everybody understands that "mv" is for >>> "move". But "grep"? Most of all I like "dd", reminds me of 2001's HAL, >>> abcd ... hijklm ... yvz, it's negated by the filmmakers, but anyway ... >>> ^^ ^^ ^^ ... obviously IBM. >> >> dd is probably the Unix command I hate most (even though I use it a >> lot), [...] > > The choice of dd may not sound reasonable today, but when UNIX > developed, the C compiler was _the_ essential component in order > to get things running: it was the source of anything else, and > it existed before anything else. So "copy & convert" couldn't > be named cc, and dd was usable. Today we have ee ("easy editor") > and ll (usually an alias for "ls -l" plus often other options). It's not the name I object to, but the adherence to IBM JCL style parameters in a Unix world. The blocking, conversion, etc could have just as easily been added to the cp command (or a variant of it) and used the familiar command style. >> [...] just as I hated the original DD directive (and all the rest of >> JCL) back in the days when I had to use it. There were far better ways >> of doing things even then. > > But not on systems that ran OS! :-) At the time when I was seriously working on an IBM machine, I also worked on a CDC 7600 and an ICL 190x (can't remember what digit x was at this distance). The CDC job control (Scope??) looked like Algol 60 function calls, and the GEORGE 3/4 command language was remarkably like sh (complete with user defined commands). JCL came a very weak third in usability or comprehensibility. >> I've always wondered what the original writer of dd was on when he >> perpetrated that act of madness. There was Unix, with a relatively clear >> way of doing things involving -x style options and simple file names and >> then, ooh, I know what it needs, an invasive alien directive imported >> from the Big Blue universe, totally unlike anything else in the system. >> It really should have been >> >> dd [options] [ infile [ outfile ]] >> >> with the options controlling block sizes, conversions, etc. > > Yes, dd is somehow an exception. A syntax like > > dd [options] -i infile -o outfile > > would have been imaginable, but its current style > > dd [option=value] if=infile of=outfile > > summarized as > > dd [operands ...] > > in the manpage, somehow reminds me to JCL if I think of it. > Allow me to make this clear: dd was directly based on JCL's DD directive, the original author (whose name escapes me) actually liked it and wanted to copy it as far as possible. > //COPYME JOB (001),ROOT,CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1) > //COPYPROG EXEC PGM=DD > //STUFF DD IF=SYS1.LINKLIB(VI),OF=USR.BIN(VI), > // UNIT=5065,VOL=SER=USR001,DCB=(BLKSIZE=512,RECFM=F) > //STDIN DD DUMMY > //STDOUT DD SYSOUT=* > //STDERR DD SYSOUT=* > // > > Note that this is so wrong in so much more than the obvious ways. :-) Yes, so wrong in so many ways. :-) It's been nearly 40 years now since I last used JCL. There's an IBM Handbook (the small ring bound thing that had cheat sheets for almost everything IBM-ish) packed away somewhere round the house, but I can't remember where exactly. As I remember it was only 10-15 cm wide, but the cheat sheet showing all the arguments (and sub-arguments) for DD unfolded to about 60 cm. > There are few other exceptions, for example programs that read > the list of files to be processed via stdin; cpio is such a program, > if I remember correctly. cpio (and xargs) take file names from stdin in order to be used in a pipeline with find, which is normal for Unix. I don't know if you're familiar with this piece from the mid 80s http://www.hillside.co.uk/articles/cult.html The bit about the "Perfect Ritual" under Sects still has me laughing as I worked on both AT&T and BSD Unices over the years. These days you'd have to add the Linux ritual requirements as well.