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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-29-2006
tipsy tipsy is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 35
Thumbs up Query on a shell script logic

Hello people,
I am new to shell scripting and hoping to get a quick answer to my query.
I am writing a simple script which needs to call an executale which generates an output file. Once the output file is generated I have to do a couple of more task with that file. The executable ideally takes 2 to 3 minutes to finish execution.
My question is
- Should I call the executable & once done look for the output file to do the next steps.
Or
- Should I run the executable as a backgound process using "&" and then have a loop which will keep checking whether the output file is generated.

Is there any drawbacks with following either of these approaches.

Any inputs would be highly appreciated.

Regards,
Tipsy