The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
check the directory exist ust Shell Programming and Scripting 7 09-22-2008 08:49 PM
How to check directory exist on servers weonpc Shell Programming and Scripting 2 03-06-2008 06:29 AM
Check if certain files exist in a directory, if not add name to a textfile SunnyK Shell Programming and Scripting 1 02-07-2008 09:21 AM
How to check a file exist and do a copy of other files ahjiefreak Shell Programming and Scripting 6 12-20-2007 12:07 AM
how to check if the file exist or not? gusla UNIX for Dummies Questions & Answers 3 03-27-2002 10:56 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-20-2008
alternapop alternapop is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 13
check/wait for files to exist before continuing

I'm attempting to write a pretty simple script. It opens a Filemaker file successfully. That Filemaker file takes around 30-90 seconds to finish. When it's done, it writes a few .xml files into the same directory where my shell script and the Filemaker script reside.

In my script, how can I loop/wait until the Filemaker process is finished? Basically loop until the .xml files are created, then continue.

I've tried a couple of things and searched for solutions but can't get it to wait...

Code:
# -----
open fmp_file.fp7


Thanks!
  #2 (permalink)  
Old 11-20-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink

What about something like this?

Code:
> cat chkf80
while [ ! -s file80 ]
  do
  printf "%10s \r" waiting 
done
echo "found it   "
  #3 (permalink)  
Old 11-20-2008
alternapop alternapop is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 13
Code:
while [ ! -s *.xml ]
  do
  printf "." 
done
echo "found it   "
that seemed to have worked... i used the above.
thanks!
Sponsored Links
Closed Thread

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0