From owner-freebsd-questions Fri Sep 6 14:16:31 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27C8B37B400 for ; Fri, 6 Sep 2002 14:16:29 -0700 (PDT) Received: from mail.navitaire.com (mail.navitaire.com [205.182.62.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 469A343E72 for ; Fri, 6 Sep 2002 14:16:28 -0700 (PDT) (envelope-from brian.henning@navitaire.com) Received: from exchange.Navitaire.com (exch.navitaire.com [149.122.4.14]) by mail.navitaire.com (Switch-2.1.4/Switch-2.1.0) with ESMTP id g86LGRp01414 for ; Fri, 6 Sep 2002 16:16:27 -0500 (CDT) Received: by exchange.Navitaire.com with Internet Mail Service (5.5.2653.19) id ; Fri, 6 Sep 2002 16:15:35 -0500 Message-ID: From: "Henning, Brian" To: " (E-mail)" Subject: scripting problems Date: Fri, 6 Sep 2002 16:15:34 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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