![]() |
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| timing your functions | bebop1111116 | High Level Programming | 3 | 11-01-2006 04:19 PM |
| Kshell scripts and timing | dbridle | AIX | 3 | 10-10-2006 01:26 PM |
| Timing out a SSH | rcunn87 | Shell Programming and Scripting | 9 | 07-31-2006 06:11 PM |
| scp timing out | jph | UNIX for Advanced & Expert Users | 1 | 06-09-2005 11:59 PM |
| bourne shell timing question | gillbates | UNIX for Dummies Questions & Answers | 7 | 02-01-2004 04:44 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hi guys..
i have a shell script that loops through a certain directory to see if a file has been created and then prints the file if it exists... the only problem i have now is that sometimes the flat does not get created by the program thats supposed to create it, in this scenario, my loop will never end.. is there a way i can check to say if the loop has been on for like 2 mins to break.. this is what i have so far.. if [[ -f ${data_dir}/sqrs0008.dat ]] then exec < ${data_dir}/sqrs0008.dat IFS="," while read schedule_id username printer_name; do until [[ -f ${output_dir}/${db_user}.${schedule_id}.prn ]] do sleep 10 if [[ -f ${output_dir}/${db_user}.${schedule_id}.prn ]] then lp -d${printer_name} -t$username ${output_dir}/${db_user}.${schedule_id}.prn break fi done done fi can anyone help out there, as i need an urgent fix to this ?? cheers guys |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|