Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ulowell!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: comp.sys.amiga Subject: Re: arp CD command change??? Summary: Unix wildcards are still better Message-ID: <6001@cbmvax.UUCP> Date: 18 Feb 89 03:10:47 GMT References: <8902131846.AA21527@postgres.Berkeley.EDU> <35960@bbn.COM> <3439@sugar.uu.net> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 64 In article <3439@sugar.uu.net> peter@sugar.uu.net (Peter da Silva) writes: >In article , deven@pawl.rpi.edu (Deven Corzine) writes: [ says Unix wild cards are just as good as AmigaDos's ] >Not so. You can't, in UNIX wildcards, specify "all .o or .s files starting >with "uk", "can", or "us", and an optional ".z". Yes, you can, and this is an example of the flexibility of expanding wildcards in the shell and passing them to programs as separate args: uk*.[os] can*.[os] us*.[os] uk*.[os].z can*.[os].z us*.[os].z >On the Amiga you can specify: > > (uk|can|us)#?.(o|s)(|.z) In this example, the Amiga syntax is certainly more consice and easier to understand, but there are examples that go the other way as well. For example, suppose you want to specify just the files foo, bar, and baz. In bourne shell syntax it's foo bar baz but in AmigaDos syntax you have to type foo|bar|baz which results in an undesired directory search, and many AmigaDos programs won't let you extend the above extension arbitrarily. I remember one time I was trying to copy several particular files from sys:c to ram:c and the AmigaDos copy command would only copy the first five matching files when I used the above syntax. I had to use multiple copy commands to get it done. This was partially because of a bug in that particular command's wildcard expander (which has been fixed, I beleive), but was compounded by the fact that most AmigaDos programs will only accept ONE single (possibly wildcard) argument as their file list. Here are some examples of things that just CAN'T be done with AmigaDos wildcards: dir1/foo dir2/bar dir3/baz dir1/foo dir2/foo dir3/foo dir[123]/foo */foo (and similar constructs using device/assign names rather than directories.) >> In addition, the wildcards are expanded in the shell, [ ... ] >This is nice, but an orthogonal issue. I disagree, it is a closely related issue, and certainly a more significant one. AmigaDos wildcard syntax is more general than that of Unix shells, but because it can only be used in more limited ways, it is less useful. AmigaDos wildcard "features" can be emulated on Unix, but not vice-versa. And on Unix it would take 5 minutes to modify the shell to use AmigaDos wildcard syntax and everything would work. Each user can choose a shell that uses the preferred syntax. -- -=] Ford [=- "The number of Unix installations (In Real Life: Mike Ditto) has grown to 10, with more expected." ford@kenobi.cts.com - The Unix Programmer's Manual, ...!sdcsvax!crash!kenobi!ford 2nd Edition, June, 1972. ditto@cbmvax.commodore.com