Search This Blog

Sunday, May 2, 2010

How do I pass in the asterisk character '*' in bash as arguments to my C program?

Programmer Question


Let's say I have a C program, and I run it from bash:



$ ./a.out 123 *



The program would output all the command line arguments,
but it will show these instead:



Argument 1: 123
Argument 2: a.out



What can I do in my program to fix this?





Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails