Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!news.funet.fi!polaris.utu.fi!polaris!sutela From: sutela@polaris.utu.fi (Kari Sutela) Newsgroups: comp.sys.amiga.introduction Subject: Re: Wildcards in the CLI Message-ID: Date: 7 May 91 06:42:09 GMT References: <1991Apr16.155231.18782@ux1.cso.uiuc.edu> <7384@munnari.oz.au> <6512@bwdls58.bnr.ca> <20893@cbmvax.commodore.com> <1991Apr25.100919.21595@fwi.uva.nl> <21179@cbmvax.commodore.com> Organization: University of Turku, Finland Lines: 48 jpc@fct.unl.pt (Jose Pina Coelho) writes: >In article <21179@cbmvax.commodore.com> daveh@cbmvax.commodore.com >(Dave Haynie) writes: >> >> And pattern matching is now a dos.library function call, which means that >> all programmers have access to this, anywhere they want it. > - Oh God!!! Let it be UNIX-like wild cards (or full regexps). I don't understand why people consider the stupid star to be so important. Anyway, there's a small PD-utility (StartBurst) which enables the DOS-flag which makes * to be equal to #?. To my knowledge the regexps supported in release 2 of system software are: ? matches any character # matches an indefinite (0 or more) number of the following pattern | matches either the pattern on the left or the right side () used for grouping the patterns ' used to escape the following character % a null pattern ~ (tilde) matches anything but the following pattern [c-x] matches a character range. BTW, I didn't notice any documentation on this feature in my System Software manual --- anyone got a description of this? It seems that one can also specify character sets like [cef]. As you can see, the 2.0 regexps are quite powerful. They are not the same as the Unix ones, but what's wrong with that. AmigaDos is not Unix. >Copy files [to] [file/dir] > ^^^^ why the f*** ? Because one could want to specify the parameters in a different order. For example, "copy to destination from source". Nevertheless, the TO and FROM keywords are optional if one uses the normal order of the parameters (source first/destination second). >By the way, what is the behavior of copy when I say "copy #? to" ? >Does it try directory ``to'' like it should ? Don't know, haven't tried. But really, should it??? You must escape Unixxy options, too, if you want to use them as arguments (how do you grep for a pattern like -i). Have you tried 'copy #? "to"' --- notice the quotes around the keyword? -- Kari Sutela sutela@polaris.utu.fi