Hi,
I'm trying to run my application on HP-UX server.
I have to extract a *.tar.gz file.
I'm doing that now in 2 steps.
first I gunzip it and then pax it.
My question is how can I check whether the data in the *.tar.gz file is corrupted or not??
Now, I'm trying to do this
gunzip_status=`gunzip -f $dir1/$filename.tar.gz`
if { ( echo $gunzip_status | grep invalid >/dev/null ) } then
echo "$filename.tar.gz is corrupted "
mailx -s "File $filename.tar.gz is corrupted " email@server.com < gunzip_err.txt
else
pax -v -r -s ',//*log_recv/di/data/interface//*,,' -f $filename.tar
fi
and it is not working
Any advice???? cos there are chances that the incoming file maybe corrupted.