I have 10 text files and I want to paste each file with its pair, such that I have 5 total files.
paste
I tried the following:
for i in 4_1 5_
the above did not work for me, but the following does read values in pairs from an ordered list
(can be more than pairs adding extra 'read-lines' :-)
while read x; do read y echo $x $y done << '___HERE' X1 Y1 X2 Y2 X3 Y3 ___HERE
produces
X1 Y1 X2 Y2 X3 Y3