Re: Using the wait function
From: Bill Marcum (bmarcum_at_iglou.com)
Date: 05/29/03
- Next message: Barry Margolin: "Re: Can't telnet or rsh to Solaris"
- Previous message: TNT: "Can't telnet or rsh to Solaris"
- In reply to: Anne: "Using the wait function"
- Next in thread: Mohamed Bouherrou: "Re: Using the wait function"
- Reply: Mohamed Bouherrou: "Re: Using the wait function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 29 May 2003 10:40:10 -0400
On 29 May 2003 06:55:06 -0700, Anne
<apembert@hq.nasa.gov> wrote:
> 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
>
The wait shouldn't be necessary, since there isn't an & in your script,
but you could do
tar -cf - | gzip >$FILE
or, if you have gnu tar
tar -cvzf $FILE
-- This place is called Antarctica. There is no kitten here.
- Next message: Barry Margolin: "Re: Can't telnet or rsh to Solaris"
- Previous message: TNT: "Can't telnet or rsh to Solaris"
- In reply to: Anne: "Using the wait function"
- Next in thread: Mohamed Bouherrou: "Re: Using the wait function"
- Reply: Mohamed Bouherrou: "Re: Using the wait function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|