Thread: how do I store stdout value from system(); into a char* variable?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    1

    how do I store stdout value from system(); into a char* variable?

    how do I store stdout value from system(); into a char* variable ?

    e.g.

    I have child process that executes system(); function , but the output is displayed on server (parent) tty,

    I would like to store the output of system("ls -la");

    into a char* variable for later use / display .



    is this possible ?

    thanks,
    Last edited by everyoneca; 08-03-2005 at 01:17 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Read first line of a file and store in a variable
    By Saeid87 in forum C Programming
    Replies: 5
    Last Post: 06-19-2009, 11:27 AM
  2. Question about printing a variable???
    By Hoser83 in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2006, 01:57 PM
  3. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 12:07 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM