Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2002 16:15:34 -0500 
From:      "Henning, Brian" <brian.henning@navitaire.com>
To:        " (E-mail)" <questions@FreeBSD.ORG>
Subject:   scripting problems
Message-ID:  <E1846117A30764468D2192D5A48541CC03894DF2@exchange.Navitaire.com>

next in thread | raw e-mail | index | archive | help
Hello-
i have this shell script that i am having problems with. when i run it (cat
output.txt | xargs sh mycheck_sum.sh) i get an error that cannot open file.
but all the files are there. i am not sure what the problem is with this
script.
can someone take a quick look and tell me if they see anything? 
thanks,
brian

#! /bin/sh -x
# cat output.txt | xargs sh mycheck_sum.sh

INPUT=$1
SRC=`echo ${INPUT} | awk -F: '{ print $1 }'`
DST=`echo ${INPUT} | awk -F: '{ print $2 }'`

#echo ${DST}
#find ${DST} -name 

tar -cef ${DST} /istar_bkp/ib/${SRC}
STATUS=$?
if [ "$STATUS" -ne 0 ]; then
    echo "Failed to tar all images in ${SRC} directory."
    exit 1
fi
cksum ${DST} >> /PRA/prod/files/ib/area241/henninb/cksum.txt
cksum ${DST}
STATUS=$?
if [ "$STATUS" -ne 0 ]; then
    echo "Failed to checksum: $DST."
    exit 1
fi
/usr/bin/rm ${DST}
if [ "$STATUS" -ne 0 ]; then
    echo "Failed to remove: $DST."
    exit 1
fi
exit 0;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1846117A30764468D2192D5A48541CC03894DF2>