[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46422: 'pr' screws up tabstops in multicolumn outpt?
From: |
Erik Auerswald |
Subject: |
bug#46422: 'pr' screws up tabstops in multicolumn outpt? |
Date: |
Wed, 10 Feb 2021 16:44:14 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König wrote:
> I'm sorry if I this is not a bug but to be expected, but I thnk pr
> doesn't get the alignment of tabs in multicolumn output right.
>
> Consider the following test input, where everything from x->x is a tab
> (with tabs 8):
Email quoting disturbs the alignment with tabs, thus I omit those
examples.
> Run it through multicolumn pr, e.g.,
>
> pr -t -2 test > out
>
> The output looks [garbled.]
> [...]
> In contrast, on a SunOS 5.10 machine, I get:
>
> 123456781234567812345678123456781 123456781234567812345678123456781
> x x x x x x x x
This is lacking the first 'x', did you use a different input file?
> Basically, SunOS pr notices, that it cannot print "\tx\tx\tx\tx"
> anymore, since the separation between the pages messed that up.
> Instead it prints "\t x\t x\t x\t x".
You can work around the issue by using "expand" to change tabs into
spaces before using "pr":
$ expand test | pr -t -2
123456781234567812345678123456781 123456781234567812345678123456781
x x x x x x x x x x
> [...]
> This seems *kind* of related to multi-column merged
> output, as was discussed some years ago here:
> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html
Just keeping tabs for the second column cannot always work.
> [...]
> What do you think?
It seems to me the approach of "expand"ing the tabs to spaces before using
"pr" is the most general.
Thanks,
Erik
--
Be water, my friend.
-- Bruce Lee
- bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Leonard Janis Robert König, 2021/02/10
- bug#46422: 'pr' screws up tabstops in multicolumn outpt?,
Erik Auerswald <=
- bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Erik Auerswald, 2021/02/10
- bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Erik Auerswald, 2021/02/11
- Message not available
- Message not available
- bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Leonard Janis Robert König, 2021/02/11
- bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Erik Auerswald, 2021/02/11
- bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Erik Auerswald, 2021/02/13
- bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Erik Auerswald, 2021/02/13
- bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Leonard Janis Robert König, 2021/02/13
- bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt?, Erik Auerswald, 2021/02/13