[comp.unix.programmer] How to run a process with arguments, and trap its output, from C

jdubb@bucsf.bu.edu (jay dubb) (03/14/91)

   I am posting this for a friend of mine who doesn't have access
to USENET, so please respond directly to mlevin@jade.tufts.edu.

   How would I, from C on a BSD4.3 Unix system, run a shell command
(with arguments, etc.) and trap its output (perhaps into a FILE *
pointer so I can access it via the stdio functions)? Thanks in
advance.

					Mike Levin (mlevin@jade.tufts.edu)

tchrist@convex.COM (Tom Christiansen) (03/15/91)

From the keyboard of jdubb@bucsf.bu.edu (jay dubb):
:   I am posting this for a friend of mine who doesn't have access
:to USENET, so please respond directly to mlevin@jade.tufts.edu.
:
:   How would I, from C on a BSD4.3 Unix system, run a shell command
:(with arguments, etc.) and trap its output (perhaps into a FILE *
:pointer so I can access it via the stdio functions)? Thanks in
:advance.

% man 3 popen


--tom

    USENET is not an AI interface to the UNIX manuals.