[fpc-pascal] Parsing commandline parameters with wildcards on Linux
Marco van de Voort
marcov at stack.nl
Sun Apr 10 12:12:19 CEST 2011
In our previous episode, Luca Olivetti said:
> > Obviously this is a common scenario on Linux, so how to treat it?
> You don't, accept the fact and don't try to oppose resistance ;-)
> > I would prefer to expand the wildcards by myself, but it seems I have
> > no access to what the user actually typed on the commandline?
> The only way is to single quote parameters:
> ./scopy '*' y '*.bak'
> (see, e.g., the manual page for find).
Or change the syntax in a way that the last command is not a wildcard.
mv/cp work that way, they assume the last argument is a destination, and all
others are generated by wildcards.
More information about the fpc-pascal