• How to save the output of a command in buffer?

    From IoClaudio@21:1/5 to All on Wed Feb 7 08:34:22 2018
    Hi,
    I've found this snippet of code that saves the output of the command ifconfig in a file on a ramdisk:

    ...
    char myBuf[ BUFF_SIZE ];

    (void)ifconfig( 0 );
    fflush ( fp );
    rewind ( fp );

    ul_bytesRead = fread( (char*)myBuf, 1, BUFF_SIZE, fp );
    ...

    Is there a way to save the output of "ifconfig" directly into the buffer "myBuf" ?

    Thank yopu very much

    cld

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)