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
Process wait time chandrakala.sg SUN Solaris 1 09-19-2007 01:04 AM
PERL: wait for process to complete dangral Shell Programming and Scripting 2 04-21-2004 03:37 PM
Process Wait on DG UX fabbas UNIX for Dummies Questions & Answers 4 01-07-2004 06:56 AM
some process writin file - check if complete sade Filesystems, Disks and Memory 0 09-26-2003 08:46 AM
capture the process id when starting a background process jleavitt Shell Programming and Scripting 10 04-04-2002 08:04 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-10-2005
gozer13's Avatar
gozer13 gozer13 is offline
Registered User
  
 

Join Date: Dec 2004
Location: Salt Lake City, Utah
Posts: 46
Talking Wait for Background Process to complete

I am attempting within a for-loop, to have my shell script (Solaris v8 ksh) wait until a copy file command to complete before continueing. The specific code is:

for files in $(<inputfile.lst)
do
mv directory/$files directory/$files
ksh -m -i bg %%
wait $!
done

I am shaky on the procedure to set something in background. Is there a way to set something in background then use a like a grep on ps -ef, passing its id to the wait command? Or am I just really out there? Thanks in advance for any replies.

...Gozer13
 

Bookmarks

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:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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