how can a call a program with command line args?
i checked out popen, but i havnt seen anything about program arguements.
how can a call a program with command line args?
i checked out popen, but i havnt seen anything about program arguements.
You mean like:
fp = popen ("ping 127.0.0.1", "r");
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
i was wondering if something like this was possible
popen("ping %s", r, ip_string);
If you look at, and actually read, the man page, popen only takes 2 parameters.
brilliant!!!If you look at, and actually read, the man page, popen only takes 2 parameters.
thats why i asked the question in the first place!!!
im looking for a function/way to execute a program with arguements and be able to read its output. im not sure how to go about this.
any ideas?