I am doing programming with TCL language. But the argument in the command line seems always using glob style matching. This means each argument is always tried by the TCL interpreter to match with file names in current directory. But many times, I don't want to use the arguments as file name patterns. So the script gives wrong output. If the matching style is changed into exact or regexp depending on cases, then it will serve the purpose of what I need. How to change this?
Example: script.tcl /home/usr/tcl param*
The system is always trying to interpret /home/usr/tcl and param* as file or path matching patterns, or in other words, using glob style.
The argument is no longer param*, but becomes following several arguments:
param, param_1, param_log, while each one is a file name in current directory.
But in my script, the argument param* has nothing to do with file name. So the script cannot run correctly.
What's more, if there's no file matching such pattern, then the script even cannot run because of no match.
This is called glob style. How to change the command line argument interpreting from glob style into exact or regexp style?
If the style is changed correctly, then my script would work.
Thanks.