#!/usr/bin/env perl ## ## watchdiff: watch difference ## ## Copyright 2014- Kazumasa Utashiro ## ## Original version on Feb 15 2014 ## use v5.14; use warnings; use App::watchdiff; exit App::watchdiff->new->run(splice @ARGV); __END__ =pod =head1 NAME watchdiff - repeat command and watch differences =head1 SYNOPSIS watchdiff option -- command OPTIONS: -r, --refresh:1 refresh screen count (default 1) -i, --interval=i interval time in second (default 2) -c, --count=i command repeat count (default 1000) -e, --exec=s set executing commands -s, --silent do not show same result -p, --plain shortcut for --nodate --nonewline --[no-]date show date at the beginning (default on) --[no-]newline print newline result (default on) --[no-]clear clear screen after output (default on) --diff=command diff command used to compare result --unit=unit comparison unit (word/letter/char/mecab) -V, --verbose print diff control command (default off) -M, --mark show diff mark (default off) -O, --old show old data (default off) -C[#],--context=# diff before/after context (default 2) -S, --scroll set scroll region (default on) -h, --help show help -v, --version show version =head1 VERSION Version 4.41 =head1 EXAMPLES watchdiff df watchdiff --silent df watchdiff --refresh 5 --noclear df watchdiff ifconfig en0 watchdiff -sri1 -- netstat -sp ip watchdiff -ps --diff=sdif netstat -sp ip watchdiff -e uptime -e iostat -e df watchdiff -pc18i10r0 date; say -v Alex Ramen is ready watchdiff -sU2 du -h ~/Music =head1 DESCRIPTION Use C<^C> to terminate. Basically B<watchdiff> command expect the command output is small enough to fit within a terminal screen size. If the output is longer than the screen height, only the final part is shown. Use C<-C#> option if the output is large and you want to see modified part only. =head1 OPTIONS =over 7 =item B<-C>[I<context>] Show I<context> lines before/after updated part. This option implies the C<--verbose> option enabled. To explicitly disable it, specify the C<--no-verbose> option. =item B<-S>, B<-->[B<no->]B<scroll> Set the scroll area from the third line of the screen to the bottom edge. Default on. =back =head1 AUTHOR Kazumasa Utashiro L<https://github.com/kaz-utashiro/sdif-tools> =head1 LICENSE Copyright 2014-2025 Kazumasa Utashiro This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L<App::sdif> L<diff(1)>, L<cdif(1)>, L<sdif(1)> =cut # LocalWords: watchdiff diff Kazumasa Utashiro ifconfig df netstat # LocalWords: icmp iostat sdif