Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!sdcsvax!hutch From: hutch@sdcsvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: Wildcard expansion Message-ID: <2292@sdcsvax.UCSD.EDU> Date: Wed, 10-Dec-86 15:05:41 EST Article-I.D.: sdcsvax.2292 Posted: Wed Dec 10 15:05:41 1986 Date-Received: Sun, 14-Dec-86 07:46:37 EST References: <143@dragon.tc.fluke.COM> Reply-To: hutch@sdcsvax.UUCP (Jim Hutchison) Distribution: comp Organization: UCSD EMU Project (Educational Microcomputer Unix) Lines: 64 In article <143@dragon.tc.fluke.COM> kurt@tc.fluke.COM (Kurt Guntheroth) writes: >I am not so convinced that automatic wildcard expansion (which UNIX people >apparently call file globbing) in the shell is A Good Thing. Anyone remenber >commands like > >PIP foo.* = bar.* > >which would copy bar.c to foo.c, bar.rel to foo.rel, bar.exe to foo.exe? >You just can't do that on UNIX. Famous last words... Well, not to argue about the surprises about globbing. Yes pip is a fine program, I used it a great deal on an H89. pip foo.\* = bar.\* I realize that you may not like quoting mechanisms, but what about consistant schemes for the use of wild carding? Do I have to remember who does it which way? That seems even more annoying then having to use quoting mechanisms. -*or*- In your startup file set noglob Later that evening... prompt> pip foo.* = bar.* If the shell/CLI allows global wildcard expansion to be turned off, then people can have it the way they like it and the OS/shell writer does not have to see the future in order to make them all very happy (I have seen the future, and it contains beer :-). BTW: unix Csh shell script for pip #!/bin/csh # # Pip a DECism/CPMism (peripheral interchange program) # # Usage: pip dst.\* = source.* # -or- # pip dst.\* = source.\* # #first argument set noglob set to=$argv[1]:r unset noglob #third and later arguments, expand wild card if needed shift argv shift argv set from="$argv" #echo FROM $from TO ${to}.EXT foreach file ( $from ) set ext=$file:e cp $file ${to}.$ext end -- = Jim Hutchison UUCP: {dcdwest,ucbvax}!sdcsvax!hutch ARPA: Hutch@sdcsvax.ucsd.edu panic -- no witty phrase