how to read input file that occasionally contains extra line feeds?

Most of the time, I am given an input file that looks like this: java-1.8.0-openjdk.x86_64 1:1.8.0.232.b09-1.el6_10 asyum:ol6_latest java-1.8.0-openjdk-headless.x86_64 1:1.8.0.232.b09-1.el6_10 asyum:ol6_latest kernel.x86_64 2.6.32-754.23.1.el6 asyum:ol6_latest …and I have a while loop that is able to successfully capture field1 and field2 from each line using this code: f1=$(echo $line | awk ‘{print $1}’) f2=$(echo $line | awk ‘{print…

Details