From: Dobrica Pavlinusic Date: Wed, 12 Oct 2016 16:38:49 +0000 (+0200) Subject: format output readable X-Git-Url: http://git.rot13.org/?p=vaillant-thermostat;a=commitdiff_plain;h=2476fe0adf62454dae2382444c2d8520326f8267 format output readable --- diff --git a/serial.pl b/serial.pl index e72c99a..6620593 100755 --- a/serial.pl +++ b/serial.pl @@ -23,7 +23,7 @@ while (1) { if ( $len > 0 ) { my $hex = unpack('H*',$string); $hex =~ s/(..)/$1 /g; - print time(), " $len $hex\n"; + printf "%s %2d %s\n", time(), $len, $hex; } }