2011-03-25 18:45:13 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
|
|
|
|
FILE *fd;
|
|
|
|
char temp[256];
|
2014-09-14 17:57:14 +00:00
|
|
|
|
2011-03-25 18:45:13 +00:00
|
|
|
fd = popen("tac /etc/ppp/connect-errors | grep '['CONNECT'|'CARRIER']' | head -1", "r");
|
|
|
|
|
|
|
|
while (fgets(temp, 256, fd)) {
|
|
|
|
printf("%s", temp);
|
|
|
|
}
|
|
|
|
|
|
|
|
pclose(fd);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|