Home » Infrastructure » Unix » read line issue (unix)
read line issue [message #664577] Sun, 23 July 2017 11:24 Go to previous message
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

 
Read Message
Read Message
Previous Topic: How to identify the column which can act as a primary key (or unique) in a file
Next Topic: Calling stored procedure from shell
Goto Forum:
  


Current Time: Tue Apr 23 09:59:54 CDT 2024