in reply to Detect * in arguments
The Linux shells pre-globber your wildcards and convert them to matching filenames; Windows does not.
Since your users are Linux users, they should be familiar with the shell processing rules, and the idea that you could reject any input with more than one @ARGV might be reasonable.
Otherwise, yes, in the Linux environments, you could try to deduce where the wildcard characters were located based on the input your receive, but that's some risky business, as there is a one-to-many relationship there.
For example, what if what comes back is the only file that matches: test1.dat
The following is not a complete list of how you might have gotten that:
I hope you see my point -- given that one result could have come from a multitude of inputs, it's like a one-way trap door encryption algorithm; you can't navigate the canoe back up the river.
I'd be inclined to educate the users to use quotes; with a far second of trying to compensate for this particular human problem.
|
|---|