read line issue [message #664577] |
Sun, 23 July 2017 11:24 |
|
POGAKU_SANTHOSH
Messages: 39 Registered: April 2017
|
Member |
|
|
I have a script which need to look into a lst file and read the line and print the line if there is nothing left in the list it need to exit the script but the below script is looping itself and the lst file has two numbers(man,san) can any one help me out.
vi do.lst
man
san
code:=
cat /ora/do.lst
while read -r line
do
if [[ -z $line ]]
then
echo "The list is empty "
exit
else
lst_no=${line},
echo "${line} is processing now "
fi
done
[Updated on: Sun, 23 July 2017 11:27] by Moderator Report message to a moderator
|
|
|
|