#include <stdio.h>
#include <stdlib.h>

main()
{
   FILE *fp;
   char buf[80];
   int i=0;

   fp=popen("ls -l|more","r");
   while(fgets(buf,80,fp)!=NULL)
   {
	printf("%s\n",buf);
   }
   pclose(fp);
   return 0;
}
