This is the mail archive of the
cygwin
mailing list for the Cygwin project.
tar checkpoint-action screen width padding
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 17 Oct 2017 18:38:46 -0700 (PDT)
- Subject: tar checkpoint-action screen width padding
- Authentication-results: sourceware.org; auth=none
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