Thanks for your reply!
Now actually there is bit change in the requirement ...
NOw we have to check whether there are 14 number of '.done' files present in the specific path.if it present then we have to run another script..
if not we have to wait till all these '.done' files are generated.
As per the above mention post i have tried to loop the script using 'while' loop but it is not giving me warning...
the following is the code:
while [ ! -f $PARMDIR/test_running.txt ]
echo file not present
echo waiting for file
cntdone=`ls -ltr | grep done | wc -l`
if [ $cntdone -eq 14 ]
sh batch2.sh #running different script
echo in the else loop
echo 'Still Running'
The above script does not comes out of the loop even though value of "cntdone=14"..it is throwing me following error:
/test_running.txt: Permission denied
Thanks in Advance!