I have a text file which contains the following lines:
7.3.0
12
I am using the below lines to read the content line by line
while read -r LINE; do
if test $n -eq 1
then
var01=$LINE
fi
if test $n -eq 2
then
var02=$LINE
fi
n=`expr $n + 1`
done < <(tr -d '\r' < /mnt/Share/hpsum_build.txt)
the above code doesn't read 2nd line that is last line '12' which doesn't end with a new line. How to read the last line as well