#include <stdio.h>
#include
#include
#include
int main(int argc, char **argv){
DIR *dp;
struct dirent *ep;
char *num = "0123456789";
dp = opendir("/proc");
if(dp != NULL){
while((ep = readdir(dp))){
if(strspn(ep->d_name, num)){
printf("%s\n", ep->d_name);
}
}
closedir(dp);
} else {
perror("Couldn't open the directory");
}
return 0;
}