Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





UNIX » Shell » Coding »

Wait for sentinel file to clear

     







-- Shell scripting: wait for sentinel file to clear


#
# Wait for batch queue to clear.
#
# Keep concurrent processes to four or less
#

i=`ls /tmp/batchflag*.log 2>/dev/null | wc -l`

# loop, until three or less batch processes are running.

while test $i -gt 0 ; do

echo "Waiting for sentinel to clear ..."

sleep 10

i=`ls /tmp/batchflag*.log 2>/dev/null | wc -l`

done





-- Alternative

while test -f /tmp/sqlldr*.txt 2>/dev/null ; do

echo `date` " File exists ..."

sleep 5

done











UNIX : Related Topics

UNIX : Shell : Scan a file in a shell script
UNIX : Shell : Formatting a date

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.