Thanks, I just figured it out before I checked my email. ;) Works great as
far as I can tell, now I've just got to wait till this weekend to try
shutting down vmware and backing it up.
On 6/22/07, -ray <ray@ops.selu.edu> wrote:
>
> On Fri, 22 Jun 2007, Chris Jones wrote:
>
> > The functionality I'm wanting to add to it, is after the TAR/GZIP
> operation,
> > I want it to know if the tar command completed successfully or with
> errors.
> > If there were errors, then skip the deletion process. The skipping part
> is
> > easy, but I guess the main thing I'm wondering is how do I test whether
> the
> > tar command ran successfully? I remember in DOS, after you run a
> command,
> > you can test it with "IF ERRORLEVEL=0" and if that returns true then you
> > know the command completed successfully. What's the unix equivalent?
>
> It's similar in unix, using the $? variable. Most commands will exit
> non-zero status if there's a problem, and exit zero status if there's no
> problem. Based on this, run this code immediately after the tar command:
>
> if [ $? != 0 ]; then
> echo "tar exitted non-zero. Let's not delete"
> exit 1
> fi
>
> ray
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Ray DeJean http://www.r-a-y.org
> Systems Engineer Southeastern Louisiana University
> IBM Certified Specialist AIX Administration, AIX Support
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> ___________________
> Nolug mailing list
> nolug@nolug.org
>
___________________
Nolug mailing list
nolug@nolug.org
Received on 06/22/07
This archive was generated by hypermail 2.2.0 : 12/19/08 EST