I am running a test multiple times on terminal and redirecting output to a file. While redirecting I want each run as a separate column. Currently, I am able to get the following:
Run1
1
2
3
4
Run2
1
2
3
4
How to redirect it as follow:
Run1 Run2
1 1
2 2
3 3
4 4
With pr
:
pr -2 -t -s file
or from stdin:
cat file | pr -2 -t -s
Output:
Run1 Run2 1 1 2 2 3 3 4 4
See: man pr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With