Using the wait function

From: Anne (apembert_at_hq.nasa.gov)
Date: 05/29/03


Date: 29 May 2003 06:55:06 -0700

Hello,

I'm using both tar and gzip in a script which also writes to a LOG
when both
functions have been done. But it seems that only the tar is getting
done, and
not the gzip.
I'd like to use the "wait" command, but should it be used between the
two functions, or after such as in the example:

        tar -cvf $FILE dumps
        echo "$FILE created" >> $LOG
        gzip $FILE
        wait
        echo "$FILE was gzipped" >> $LOG

Still learnign scripts.
Thanks for any suggestions/advise.

Anne



Relevant Pages

  • Re: Using the wait function
    ... >I'm using both tar and gzip in a script which also writes to a LOG ... The wait command is used to wait for background processes to finish. ...
    (comp.unix.admin)
  • Re: Using the wait function
    ... >> I'm using both tar and gzip in a script which also writes to a LOG ... to the directory where the tar/gz file is supposed to be stored and see it's ...
    (comp.unix.admin)
  • Sub-directories and commands
    ... Perhaps a script would do the job. ... or "gzip *.tar" on all subdirectories, ...
    (comp.unix.questions)
  • Top 10 subjects comp.unix.questions
    ... posts kbytes subject ... 15 25.5 how to write the following script ... 5.9 gzip error on tar file 8GB ...
    (comp.unix.questions)
  • tar or dump and restore commands on Compaq Tru64 UNIX or Unix - restore from tape?
    ... They have a script I assume that runs a backup tape every night of just one ... So no idea if they are using tar or dump. ... assuming their either are using a tar or dump command / script. ... a restore from a tar file assuming they are using tar. ...
    (comp.unix.admin)