I am trying this simple while loop in bash.
My text file
# cat test.txt
line1:21
line2:25
line5:27
These are all on new line
My Script
# cat test1.sh
while read line
do
awk -F":" '{print $2}'
done < test.txt
Output
# ./test1.sh
25
27
The output isn't printing the first line $2 value. Could anyone please help me understand this case?