|
From: | David M. Barlieb |
Subject: | [Bug-tar] wierd exit status running tar |
Date: | Tue, 10 Jan 2012 16:08:55 -0500 |
I have been trying to write a script to compress a directory
which contains a number of linked directories in it. In the script I am
checking the exit status of the tar command to send email to me if the tar failed
for any reason. The tar string is this… /bin/tar cvzphPf /backupdir/tarfile.tgz /home/user >>
/backupdir/tarlog if [ $? –eq 0 ] then echo “exit status is $?” >>/backupdir/tarlog echo “SUCCESS” >>/backupdir/tarlog else echo “exit status is $?” >>/backupdir/tarlog echo “FAILED” >>/backupdir/tarlog fi It then emails the log file to me. The problem is, even when
apparently succesfull, it still returns exit status 1. I was able to verify it
is succesfull by comparing the log output when I copy links to when I do not. The
only difference is I’m not sure if this is a bug or if I’m missing
something or even if this is the correct place to bring it up. If not the
correct forum, could you direct me to the proper forum. Dave Barlieb Systems
Administrator IntegriChain Inc. 100 Canal Pointe Blvd, Suite 117 Princeton, NJ 08540 Office: (609) 986-2466 Cell: (856) 298-0489 Email: address@hidden |
[Prev in Thread] | Current Thread | [Next in Thread] |