Re: [Newbie] system() call

From: Artie Gold (artiegold_at_austin.rr.com)
Date: 08/28/03


Date: Thu, 28 Aug 2003 04:41:57 GMT

Senthilraja wrote:
> If I execute a unix shell command using "system()" call from a C
> program, how can the output of the command be stored in a C program
> variable.
>
> regards,
> Senthilraja.
>
>

Well, you *could* by using redirection and a temp file and...

But you don't want to do that.

Look up `popen()' which will allow you to see the results in a standard
file stream.

HTH,
--ag

-- 
Artie Gold -- Austin, Texas