please dont rip this site

Language Ccpp Cref Examples Popen.c

/ *
 * Purpose: Program to demonstrate the popen function.
 *
 * to do: Check that the 'popen' was successfull.
 *
 * Author:  M J Leslie.
 * Date:    08-Jan-94
*/

#include <stdio.h>

main()
{
  FILE *fp;
  char line[130];			/* line of data from unix command*/
   
  fp = popen("ls -l", "r");		/* Issue the command.		*/

					/* Read a line			*/
  while ( fgets( line, sizeof line, fp))
  {
    printf("%s", line);
  }
  pclose(fp);
}


file: /Techref/language/ccpp/cref/EXAMPLES/popen.c, 0KB, , updated: 1997/4/21 08:52, local time: 2024/12/25 17:09,
TOP NEW HELP FIND: 
3.147.78.185:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/language/ccpp/cref/EXAMPLES/popen.c"> language ccpp cref EXAMPLES popen</A>

Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .