tar checkpoint-action screen width padding
Steven Penny
svnpenn@gmail.com
Wed Oct 18 01:38:00 GMT 2017
You can run a command like this via mintty:
$ tar -x -f php-7.1.10.tar.xz --checkpoint-action ttyout=%c
2017-10-17 20:28:01: 0s, read: 81920 (80KiB, 5.1MiB/s)
and it updates the status on the same line. However if you run via Cygwin.bat,
it prints on multiple lines. If you break down "%c" via this page:
http://gnu.org/software/tar/manual/html_section/tar_26
You get this:
%{%Y-%m-%d %H:%M:%S}t: %ds, %{read,wrote}T%*\r
after some troubleshooting this is the problem:
%*
here is what that does:
%{n}*
Pad output with spaces to the nth column. If the {n} part is omitted, the
current screen width is assumed.
So the issue is either that "%*" is printing 1 too many spaces, or that "\r" is
taking up a character when it should not be.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list