summaryrefslogtreecommitdiff
path: root/bin/ekgping
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-02 13:42:54 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-02 13:42:54 +0200
commit608a930b5751b79cc86d4318f67ebfaacb5f3ce7 (patch)
treed53fbf6594bd74a54defe9f868a716909cc6f5d0 /bin/ekgping
parent18e96317f24f8240857101999e2c3a4f8c5a9c37 (diff)
Rewrite line every 80 chars
Diffstat (limited to 'bin/ekgping')
-rwxr-xr-xbin/ekgping6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/ekgping b/bin/ekgping
index 65b066f..f8d13da 100755
--- a/bin/ekgping
+++ b/bin/ekgping
@@ -16,6 +16,7 @@ my $last_id = 0;
my $beep;
my $was_beep = 1;
my $dead_count = 0;
+my $column = 0;
my $ping = harness(
[ 'ping', '-n', $host ],
@@ -46,6 +47,11 @@ while ( usleep(100_000) ) {
$ping->pump_nb();
+ if ($column++ == 80) {
+ print "\r";
+ $column = 0;
+ }
+
if ( $id != $last_id ) {
$beep = 1;
print q{^};