> > smbtar -s $username -x $share -p $password -t - | gzip -1 > $filename.tar.gz
> > if [ $? -eq 0 ]; then
> > # rotate the backup;
> > fi;
> > # else go on to the next machine
> >
> > The problem is, $? reports the result of the last command, which is gzip,
> > which will ALWAYS repor
On Wed, Jun 05, 2002 at 05:23:07PM -0400, Mike Dresser wrote:
> Here's a code fragment i'm trying to work on in bash
>
> I'm pulling a backup, and if smbtar aborts for whatever reason, I need
> to know not to rotate the backup.
>
> smbtar -s $username -x $share -p $password -t - | gzip -1 > $file
On 5 Jun 2002, Paul Smith wrote:
> See the PIPESTATUS variable in the bash man page.
>
> Note that this is not a standard thing, so if you use it your script
> may not be portable to other Bourne-like shells.
Thank you ever so much
smbtar -s $username -x $share -p $password -t - | gzip -1 > $fil
%% Mike Dresser <[EMAIL PROTECTED]> writes:
md> Here's a code fragment i'm trying to work on in bash
md> The problem is, $? reports the result of the last command, which
md> is gzip, which will ALWAYS report 0(well, unless the hd is full or
md> the moon is full),
Yes. The definition of
Here's a code fragment i'm trying to work on in bash
I'm pulling a backup, and if smbtar aborts for whatever reason, I need
to know not to rotate the backup.
smbtar -s $username -x $share -p $password -t - | gzip -1 > $filename.tar.gz
if [ $? -eq 0 ]; then
# rotate the backup;
fi;
5 matches
Mail list logo