I have a following endless loop checking for lost packets:
Code:
while [ 1 = 1 ]; do ping -f -i1 -c1 192.168.1.1 | while read i; do echo "$(date "+%T %d.%m"): $i" ;done ;done | grep "\: \."
..which generates following output:
Code:
:~> while [ 1 = 1 ]; do ping -i1 -f -c1 192.168.1.1 | while read i; do echo "$(date "+%T %d.%m"): $i"; done; done | grep '\: \.'
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:00 24.03:
18:50:10 24.03: .
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:10 24.03:
18:50:11 24.03:
18:50:11 24.03:
18:50:11 24.03:
18:50:11 24.03:
18:50:11 24.03:
18:50:11 24.03:
18:50:11 24.03:
18:50:21 24.03: .
18:50:31 24.03: .
18:50:31 24.03:
18:50:41 24.03: .
18:50:41 24.03:
However, there are few problems. How to stop this? I mean "Ctrl + c" does not work
And the main thing is, why does it print lines which do not contain ": ." pattern?