I have 10 text files and I want to paste
each file with its pair, such that I have 5 total files.
I tried the following:
for i in 4_1 5_
There is difference between using read -r x y
and read x && read y
while read -r x y; do
echo "$x and $y"
done <<'____HERE'
A B
C D
____HERE
will print
A and B
C and D
whereas,
while read x && read y; do
echo "$x and $y"
done <<'____HERE'
A B
C D
____HERE
will print
A B and C D
First example splits on space
, while second splits on newline
.