How can I run an external program from C and parse its output?

Posted by Josh Matthews on Stack Overflow See other posts from Stack Overflow or by Josh Matthews
Published on 2008-09-04T03:01:25Z Indexed on 2010/05/12 22:34 UTC
Read the original article Hit count: 182

Filed under:
|

I've got a utility that outputs a list of files required by a game. How can I run that utility within a C program and grab its output so I can act on it within the same program?

UPDATE: Good call on the lack of information. The utility spits out a series of strings, and this is supposed to be complete portable across Mac/Windows/Linux. Please note, I'm looking for a programmatic way to execute the utility and retain its output (which goes to stdout).

© Stack Overflow or respective owner

Related posts about c

    Related posts about external-process