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);
my (@lines, @values, @order);
+$SIG{QUIT} = \&show_stat;
$SIG{ALRM} = sub {
show_lines();
alarm $opt{interval} if defined $opt{interval} and $opt{interval} > 0;
$SIG{ALRM} = sub {
show_lines();
alarm $opt{interval} if defined $opt{interval} and $opt{interval} > 0;
if ($opt{hidemin} or $opt{hidemax}) {
$opt{hidemin} ||= 1;
$opt{hidemax} ||= @lines;
if ($opt{hidemin} or $opt{hidemax}) {
$opt{hidemin} ||= 1;
$opt{hidemax} ||= @lines;
+show_stat() if $opt{stat};