Re: [Newbie] system() call
From: Artie Gold (artiegold_at_austin.rr.com)
Date: 08/28/03
- Next message: Artie Gold: "Re: How to make A be the child process of B?"
- Previous message: Senthilraja: "[Newbie] system() call"
- In reply to: Senthilraja: "[Newbie] system() call"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Artie Gold: "Re: How to make A be the child process of B?"
- Previous message: Senthilraja: "[Newbie] system() call"
- In reply to: Senthilraja: "[Newbie] system() call"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]