You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr: multi-column mode uses spaces instead of tabs for inter-column padding #16510
In multi-column mode (-2, -3, etc.), GNU pr pads the space between columns using TAB characters. uutils pr uses SPACE characters followed by a single trailing TAB instead.
This affects all multi-column modes (-2, -3, -a) and occurs with and without custom separators (-s).
How to reproduce
printf'a\nb\nc\nd\ne\nf\n'> test.txt
# GNU pr
pr -2 -t test.txt | od -c
# uutils pr
coreutils pr -2 -t test.txt | od -c
Expected output (GNU behavior)
0000000 a \t \t \t \t d \n b \t \t \t \t
0000020 e \n c \t \t \t \t f
0000040 \n
GNU uses TAB characters to advance from the end of the left column text to the start of the right column.
Visible with cat -A:
a^I^I^I^I d$
b^I^I^I^I e$
c^I^I^I^I f$
Actual output (uutils)
0000000 a
0000020
0000040 \t d \n b
...
uutils fills the gap with SPACE characters (34 spaces) followed by a single TAB, instead of using TABs as GNU does.
Visible with cat -A:
a ^Id$
b ^Ie$
c ^If$
Impact
Programs or scripts that parse pr output and rely on TAB-delimited columns will break when using the uutils version. The visual output may appear similar, but the byte-level content differs significantly.
Activity