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