The name "grep"

Polytropon freebsd at edvax.de
Mon Jul 7 14:05:32 UTC 2014


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).



> [...] 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! :-)



> 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:

//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. :-)

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.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list