Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.unix.wizards Subject: Re: more rm insanity Message-ID: <337@cresswell.quintus.UUCP> Date: Wed, 2-Dec-87 18:41:30 EST Article-I.D.: cresswel.337 Posted: Wed Dec 2 18:41:30 1987 Date-Received: Sun, 6-Dec-87 04:04:31 EST References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <6774@brl-smoke.ARPA> Organization: Quintus Computer Systems, Mountain View, CA Lines: 27 Summary: globbing in the shell In article <1890@celtics.UUCP> roger@celtics.UUCP (Roger B.A. Klorese) writes: > >Because, unless one knows and fully understands that globbing is done by > >the shell and not the program, one would expect, as with other operating > >systems... > In article <6774@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In fact that is a key "win" of UNIX over OSes that make applications deal > with globbing. Have you ever used TOPS-10? That was a system where globbing was done by the program, not the shell. Result? No two programs had exactly the same syntax for file names (some would let you quote strange characters by writing octal, some wouldn't, some allowed directories, some didn't, &c &c). And of course user-programs and commands HAD to use different syntax... Doug Gwyn is absolutely right: doing file-name expansion in the shell so that EVERY command does it EXACTLY the same way is wonderful. If rm did its own wild-carding, you'd STILL have the "rm *" problem (after all, someone might *mean* that) and you'd have the additional problem of not being quite sure what wild-carding it accepted. (Ever tried a System V where some utilities did Berkeleyish ~user expansion, but nothing else did? Uniformity!) Here is another good way to lose files: restore a tar tape into the wrong directory. Wild-cards? What wild-cards? It's a really good way to lose files, because it looks as though you still have them... With respect to the author of PDTAR, sometimes absolute file names are exactly the right thing to have on a tar tape.