Bug 253413 - pr(1) sometimes characters in multicolumn mode
Summary: pr(1) sometimes characters in multicolumn mode
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-10 18:11 UTC by Leonard Janis Robert König
Modified: 2021-02-10 18:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonard Janis Robert König 2021-02-10 18:11:00 UTC
Hello,

I've found that when using pr(1) with multiple columns and using tabs, it may cut
off output "too early".  Consider the following file:

123456781234567812345678123456781
x	x	x	x	x
123456781234567812345678123456781
x	x	x	x	x

where we have "x\tx\tx\tx\tx" and run it through pr(1):

    $ pr -t -2 foo

The output is

123456781234567812345678123456781   123456781234567812345678123456781
x	x	x	x	   x	   x	   x	   x

I.e., missing a final x below the last '1' in each column.  As each line is of the same length, this shouldn't happen(?).