I have this script which reads lines from two files and outputs them in order of:
The first line of file1
the first line of file2
the second line of file1
the second line of file2
etc
How do I do this without using the external paste command in the script ?
paste -d'\n' file1 file2 | while read line1 && read line2;
do
#echo "$line1 $line2"
echo "$line1"
echo "$line2"
done
Thanks for that article Kerrek …. have updated my code which works fine now :