Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Handling timeout in scripts.
Name: Smita K Date: June 6, 2006 at 01:12:06 Pacific OS: HPUX CPU/Ram: N/A Product: N/A
Comment:
Hi All, I am writing a script where i am required to check for an existence of a file which gets generated after some time is elapsed as a kind of notification. However i do not want to keep waiting infintely to check if this file has been touched or no.i want to keep polling for it every 20 seconds till a max time of 2 minutes. IF it has not arrived even by the end of 2 minutes, then i want to tell the user that its timedout. Any suggestions how i can implement this ?
Name: nails Date: June 6, 2006 at 09:14:50 Pacific
Reply:
Set up a while loop, and check if the file exists. If it does, break out the loop. If it doesn't sleep 20 seconds and perform the check again. After cycling thru the loop 6 times break out of the loop.
Summary: Hi, I have a major doubt in scripts i.i if [ $MEET = '0' ] then echo " SENT " else if [ $MEET = '8' ] then echo "NOTSENT" fi fi This gave me a output but still i have doubt like EX: If i have four SE...
Summary: i am a dummy in ksh now i need to write a script to join a some file, either by joining 50 files to one file, or join the files in one after timeout. can anyone help me out? ...
Summary: I have a script that gives me the following error: Hi there, % Used Warn Filesystem Name CURRENT DISKSPACE STATUS ./diskspace.sh[25]: 0403-057 Syntax error at line 70 : `(' is not expected. The script...