#include #include #include int main(){ char l[80]; char *s; FILE *stream = popen("ls", "r"); assert(stream != NULL); int rc = fseek(stream, 0, SEEK_END); if (rc < 0) { perror("fseek"); return EXIT_FAILURE; } while (fgets(l, sizeof(l), stream) != NULL) { printf("Ligne = %s", l); } return EXIT_SUCCESS; }