Newbie: getting output of system(" ") command. - Unix
This is a discussion on Newbie: getting output of system(" ") command. - Unix ; How can I get the output of a system() command into my (Linux GUI) program?
ie int system(const char * string );
For example, if I want to do a ls command, ie system("ls") or
system("myTextProducingProgram") from within my program, ...
-
Newbie: getting output of system(" ") command.
How can I get the output of a system() command into my (Linux GUI) program?
ie int system(const char * string );
For example, if I want to do a ls command, ie system("ls") or
system("myTextProducingProgram") from within my program, and
I want to get text output of the called program in my program.
Thanks!
--
Posted via a free Usenet account from http://www.teranews.com
-
Re: Newbie: getting output of system(" ") command.
"Andrew Glass" wrote:
> How can I get the output of a system() command into my (Linux GUI)
> program?
>
> ie int system(const char * string );
>
> For example, if I want to do a ls command, ie system("ls") or
> system("myTextProducingProgram") from within my program, and
> I want to get text output of the called program in my program.
>
> Thanks!
>
>
>
Look into popen().