Dave/tripleee ( ), , :
tar [opts] [args] | perl -e '$| = 1; while (<>) { s/\n/\r/; print; } print "\n"'
$| perl print, , , (), , bash . ( , , , .)
tr, , tr ( - ) stdout.
: , . , , , . ( , ) :
tar [opts] [args] | perl -e '$| = 1; $f = "%-" . `tput cols` . "s\r"; $f =~ s/\n//; while (<>) {s/\n//; printf $f, $_;} print "\n"'
(You can also get the terminal width in more than perl-y ways, as described here , but I did not want to depend on CPAN modules.
source
share