Article View: comp.sys.amiga.tech
Article #14207Re: Wildcards
From: Dave Haynie
Date: Tue, 13 Mar 1990 22:48
Date: Tue, 13 Mar 1990 22:48
33 lines
2251 bytes
2251 bytes
In article <5383@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:
>We have on one side the folks saying "I can't trust programmers to put
> wildcard matching into programs".
>We have on the other side the folks saying "I can't trust programmers to
> properly quote shell arguments".
>Perhaps the solution is to have a syntax in the shell that says "expand
>these wildcards yourself":
That's actually not a bad solution -- programs often don't want the shell to expand
wildcards (DiskSalv for one, which wants the pattern passed in unexpanded, to match
against anything it finds on the disk). Yet, for most operations, who's actually
expanding the wildcards isn't an issue, at least until the shell runs into command-line
length restrictions (like csh does all the time for me when I'm ZOOing things under
UNIX) or the command doesn't have built-in expansion (like ZOO under AmigaDOS).
Hopefully AmigaOS V1.4 will help out here with an extended and built-in wildcard
parser. However, if anyone's interested in basic matching of standard AmigaDOS
wildcards, I'll make the routines used by DiskSalv available. They compile under
Lattice V5.02, but confuse the optimizer. They're less than 1K or so of code, and
pretty easy to use.
> _--_|\ Peter da Silva <peter@sugar.hackercorp.com>.
>/ \
>\_.--._/ I haven't lost my mind, it's backed up on tape somewhere!
> v "Have you hugged your wolf today?" `-_-'
--
Dave Haynie Commodore-Amiga (Systems Engineering) "The Crew That Never Rests"
{uunet|pyramid|rutgers}!cbmvax!daveh PLINK: hazy BIX: hazy
Too much of everything is just enough
Technical Details
Message-ID:
<10142@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!hplabs!nsc!pyramid!cbmvax!davehReferences:
<1213@lpami.wimsey.bc.ca> <13664@nigel.udel.EDU> <1414@watserv1.waterloo.edu> <13677@nigel.udel.EDU> <5383@sugar.hackercorp.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!hplabs!nsc!pyramid!cbmvax!daveh From: daveh@cbmvax.commodore.com (Dave Haynie) Newsgroups: comp.sys.amiga.tech Subject: Re: Wildcards Message-ID: <10142@cbmvax.commodore.com> Date: 13 Mar 90 22:48:39 GMT References: <1213@lpami.wimsey.bc.ca> <13664@nigel.udel.EDU> <1414@watserv1.waterloo.edu> <13677@nigel.udel.EDU> <5383@sugar.hackercorp.com> Reply-To: daveh@cbmvax (Dave Haynie) Organization: Commodore, West Chester, PA Lines: 33