I have been searching it, but it seems I am unable to find the correct information, that s why I am asking you guys, hoping somebody get an idea.
Here is my problem :
I want a script to loop until a string is identified in a log file.
Here is the script :
#!/bin/sh
##Wait for database script to finish
rc=2
while [ ! $rc -eq 0 ]
do
grep "BUILD SUCCESSFUL" /berp001_i1/AMH/database/logs/database_2012-01-31_15-11-45.log
rc="$?"
done
Do you have an idea where is the problem ?
Again thank you and sorry if the answer were outthere.
Thank you for your interest for my problem.
I want my script to hang in loop until it finds the string in the log, and then the script should continue until its end.
Is it clearer ?
You are editing scripts in Microsoft Notepad. This fills your scripts with useless carriage returns, which UNIX will consider part of the filename or command.