how can a call a program with command line args?
i checked out popen, but i havnt seen anything about program arguements.
Printable View
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");
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!!!Quote:
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?