UNIX command line arguments

Albert Chin chin at ankh.ftl.fl.us
Thu Jun 7 18:50:34 AEST 1990


First off, I thank those of you who responded to my question regarding
"char **x". I haven't had time to look at the responses yet but am greatly
appreciated. Now another question.

Under UNIX, you can specify multiple filenames with similar characteristics
with the "*" argument and also the "[..]". For instance, to remove all
files of the type "file.1, file.2, file.3" you would type "rm file.*".
Also, you could "mv file.* myfile.*". I woule like to know how the argv
arguments get interpreted when this happens. I can understand that under
"rm file.*" all files matching that parameter would be translated on the
command line as if "rm file.1 file.2 ..." had been typed. But what about
the case of "mv file.* myfile.*". Would **argv then contain "mv file.1
myfile.1 file.2 myfile.2 file.3 myfile.3". If so, then I understand, but
if now, then how else does it work.

albert chin ... mthvax!mamia!albert



More information about the Comp.lang.c mailing list