/* suorittuvat.c */
/* 180598 SJ */

#include <stdio.h>

main(int argc, char *argv[])
{
  int i, opmaara = 0, uusiluku;
  FILE *syote = NULL;
  char c, rivi[200];

  syote = popen("ls -l", "r");

  fgets(rivi, 200, syote);

  while (!feof(syote)) {
	  if (rivi[9] == 'x')
		  printf("%s", rivi);
	  fgets(rivi, 200, syote);
  }

  pclose(syote);

  exit(0);
}

