Test case: transposing a simple table.
Input data (in.csv):
Used command:
<in.csv tr , \\n | pr -3Ts,
Expected output:
Works as expected with GNU pr 9.5.
The output of uutils pr -3 -FTs,
A ,B ,C
1 ,1 ,1
2 ,2 ,2
3 ,3 ,3
Differences:
- uutils
pr requires number of columns to be specified separately: pr -3 -Ts, otherwise, the following flags don't get processed;
- for
-T to work, it requires -F as well: pr -3 -FTs,, otherwise, -T doesn't work;
- columns get aligned unconditionally, even when
-s, is specified. No difference between -s, and -S,. In GNU pr, the columns only get aligned with the -S flag.
Test case: transposing a simple table.
Input data (
in.csv):Used command:
Expected output:
Works as expected with GNU pr 9.5.
The output of uutils
pr -3 -FTs,Differences:
prrequires number of columns to be specified separately:pr -3 -Ts,otherwise, the following flags don't get processed;-Tto work, it requires-Fas well:pr -3 -FTs,, otherwise,-Tdoesn't work;-s,is specified. No difference between-s,and-S,. In GNUpr, the columns only get aligned with the-Sflag.