At 4:47 AM -0500 2/7/04, IvorW wrote: > >This thread has set me thinking, and I am reminded of something that VMS >handles rather better than Unix. VMS uses the ellipsis [...] to stand for >"and any directory path below". This renders redundant, the need for >the find utility, or equivalent.
Are you sure there are no ellipsis capabilities in Unix shells? I'm almost positive I've seen syntax like foo/.../bar but have been unsuccessful in finding documentation about the rules for pathname expansion. > one of the facilities I >built in was elliptic globbing. This meant that a command line file spec could >contain the equivalent of [...], and my shell would recursively expand this. >I got the idea because this was a facility I had got used to on VMS (then version >2.7). > >For example: > >rm /home/~me///core > >The /// reads as "blah blah blah", as does "..." in a VMS directory path spec. > >Now, many years later, I realise that nobody in the Unix world has thought of doing >this, mainly because few of them have been exposed to VMS's elliptic wildcards. >I know that the POSIX standard does not include this, but my syntax is consistent >with it. Could we provide this facility in Perl for all platforms, thus making >File::Find >redundant? > >We could also allow version number syntax ";*" and ";-1" etc. which would be >ignored by (most) operating systems that don't support multiversions. I gather that >some Unixen have a file multiversioning facility (AIX for instance), but this needs >to be specially enabled by the sysadmins, and there are also multiple caveats >as most standard Unix utilities and scripts don't expect to see multiple file >versions. > >I've also seen a nightmarish scenario when VMS is serving NFS. to Unix boxes, >and clients see a directory containing foo.pl.1, foo.pl.2 and foo.pl for a VMS >directory >containing 3 versions of foo.pl. There could also be applications relating to version >control systems, where the FS has no versioning, but the concept still exists. > >Anyway, rather than attacking the perl core to shoehorn something in that is esoteric >and arcane to most Perl people, I'm thinking of proposing a module: > >use File::EllipticGlob; > >This overrides glob in your current namespace, providing a function which does what >I am suggesting. > >Thoughts please. I'm all for it unless we already have it or can implement some standard syntax for doing the same thing. On a related matter, I note in the archives that there is a bug in Perl_trim_unixpath in vms.c. It handles ".../" but not "../" when trimming a unix-style path specification and is used to return file specs during globbing. -- ________________________________________ Craig A. Berry mailto:[EMAIL PROTECTED] "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser
