Misuse this signal as it's the best suited on linux being usually bound to
ctrl-\. The same behaviour can also be seen in at least ping from iputils.
GNU dd offers similar progress on SIGUSR1, but this cannot be bound by stty.
my (@lines, @values, @order);
+$SIG{QUIT} = \&show_stat;
$SIG{ALRM} = sub {
show_lines();
alarm $opt{interval} if defined $opt{interval} and $opt{interval} > 0;
}
show_lines();
-if ($opt{stat}) {
+sub show_stat {
if ($opt{hidemin} or $opt{hidemax}) {
$opt{hidemin} ||= 1;
$opt{hidemax} ||= @lines;
}
say '';
}
+show_stat() if $opt{stat};
__END__
=encoding utf8