#include <stdio.h>
int main(int argc, char *argv[])
{
char buf[128];
FILE *pp;
//if( (pp = popen("ls -l", "r")) == NULL )
if( (pp = popen("/mnt/apps/bin/wetctl eth1 list | awk '/0[0-1][0-9]/{print }'", "r")) == NULL )
{
printf("popen() error!/n");
exit(1);
}
while(fgets(buf, sizeof buf, pp))
{
printf("%s", buf);
}
pclose(pp);
return 0;
}