Uninterpreted command line
utzoo!decvax!ucbvax!unix-wizards
utzoo!decvax!ucbvax!unix-wizards
Thu Nov 12 00:20:26 AEST 1981
>From ARPAVAX.geoff at Berkeley Wed Nov 11 23:42:52 1981
One big problem with providing such a feature is that the shell will
continue to interpret metacharacters in filenames (* ? ~ [] {}) whether
or not the individual program wishes the interpretation to be performed.
This causes the following problems:
(1) If no files exist to match a pattern, the shell will produce the
"no match" error message >and will not execute the command<.
This is also the case for ~user for a nonexistant user.
(2) Such expansions can take a very long time if used injudiciously,
e.g. */*/*/*/*/*.
Note also that the several available shells have different metacharacter
sets. A program which interprets metacharacters on its own would ideally
treat these characters in a manner consistent with the shell which the user
is running. This means rather great complexity for the individual program.
The current simple solution: just quote your arguments when you want the
program to process them. There seems to be no easy way around this.
A difficult way of handling this would be to introduce a special program
type (set of magic numbers) to indicate to the various shells that
metacharacter expansion is to be inhibited. This solution seems more
trouble than it is worth.
Geoff Peck
More information about the Comp.unix.wizards
mailing list