File: getmodemspeed.c

package info (click to toggle)
wmppp.app 1.3.0-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze, wheezy
  • size: 252 kB
  • ctags: 156
  • sloc: ansic: 1,141; makefile: 68; sh: 30
file content (17 lines) | stat: -rw-r--r-- 244 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

int main(void) {

	FILE	*fd;
	char	temp[256];
	
	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;
}