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

Re: read line issue [message #664578 is a reply to message #664577] Sun, 23 July 2017 11:26 Go to previous message
Michel Cadot
Messages: 65252
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This question bears no real connection with Oracle database.
Please find a more appropriate forum.
The topic is locked. /forum/fa/448/0/
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

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: Wed Dec 13 11:49:28 CST 2017

Total time taken to generate the page: 0.02431 seconds