Quote:
Originally Posted by
D4vid
Hi everybody, I wrote a simple C programm on Unix (HP-UX). Initially, it has to acquire some arguments by command line and
print them on video. I use:
printf("%s\n",argv[i]);
where 'i' represents the numner of arguments in a 'for' cycle.
Problems begin when I pass a parameter containing '*' character, like this:
ab*1234*
the programm return me this sentence: "No match."
That just means that there are no files in the current directory that match that criteria...otherwise the shell would have expanded the * before passing it to your program...and if you need to pass the arguments as is then you need to put them in quotes to prevent the shell from expanding them. The error mesage is certainly weird...thogh i think it is one that you put in yourself...but then again it is hard to say without looking at your program.
Quote:
Originally Posted by
D4vid
After acquiring, these arguments would be passed to a system call so i need to load these as i write them (with asterisks).
Someone can help me ?
thanks a lot.
Alex.
What system call are we talking about...just to make sure im not confusing it with the system lib call that issues a shell command.