bash read line from file
Sometimes the readline
functionality is required and bash
could tackle it.
Seems it needs redirect or pipe to provide data.
# !/bin/bash
# using pipe
cat txt | \
while read line
do
echo $line
done
# using redirect
while read line
do
echo $line
done < `cat txt`