Code:
#!/bin/csh -f
set now = 0
# set up any other variables
#
#================================
loop:
if (! -e "/tmp/myfile") then
sleep 120 # wait 2 minutes
@ now = $now +2
if ($now > 120) goto files-missing # Waited two hours - giving up
goto loop
endif
# Put what to do if you found the file here
# and then go to the end to exit
goto end-it-all
#===================
files-missing:
# You might want to send yourself an email that it didn't get the file
# or just drop through to end-it-all
end-it-all:
exit