repo.or.cz
/
dockapps.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add missing libraries to examples' Makefiles
[dockapps.git]
/
yawmppp
/
src
/
dockapp
/
getmodemspeed.c
blob
80e2ab10c35773402e590ace9c50a08a282158dd
1
#include <stdio.h>
2
3
int
main
(
void
) {
4
5
FILE
*
fd
;
6
char
temp
[
256
];
7
8
fd
=
popen
(
"tac /etc/ppp/connect-errors | grep '['CONNECT'|'CARRIER']' | head -1"
,
"r"
);
9
10
while
(
fgets
(
temp
,
256
,
fd
)) {
11
printf
(
"%s"
,
temp
);
12
}
13
14
pclose
(
fd
);
15
16
return
0
;
17
}