I have two files:
**a.txt**
1
2
3
**b.txt**
foo
bar
baz
qux
Running
paste a.txt b.txt
gives
1 foo
2 bar
3 baz
qux
However I want to stop when the shortest file ends (that is, I want to print only complete rows, otherwise a later program down the pipeline will think qux
is the first field and the second is empty, when really it's the only way around). How can I do this?
Asked by user1350864
(591 rep)
Jan 6, 2018, 05:13 PM
Last activity: Sep 15, 2023, 08:23 AM
Last activity: Sep 15, 2023, 08:23 AM