From owner-freebsd-questions@FreeBSD.ORG Tue Jul 22 23:04:37 2003 Return-Path: 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 9DC1937B401 for ; Tue, 22 Jul 2003 23:04:37 -0700 (PDT) Received: from post2.inre.asu.edu (post2.inre.asu.edu [129.219.110.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E80443FA3 for ; Tue, 22 Jul 2003 23:04:37 -0700 (PDT) (envelope-from David.Bear@asu.edu) Received: from conversion.post2.inre.asu.edu by asu.edu (PMDF V6.1 #40111) id <0HIG00901RJKC1@asu.edu> for freebsd-questions@freebsd.org; Tue, 22 Jul 2003 23:04:32 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1 #40111) with ESMTP id <0HIG0087PRJK15@asu.edu> for freebsd-questions@freebsd.org; Tue, 22 Jul 2003 23:04:32 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.120.183]) by smtp.asu.edu (8.11.0/8.11.0/asu_smtp_relay,nullclient,tcp_wrapped) with ESMTP id h6N64WH26461 for ; Tue, 22 Jul 2003 23:04:32 -0700 (MST) Received: (from iddwb@localhost) by moroni.pp.asu.edu (8.11.6/8.11.6) id h6N64WH04023 for freebsd-questions@freebsd.org; Tue, 22 Jul 2003 23:04:32 -0700 Date: Tue, 22 Jul 2003 23:04:32 -0700 From: David Bear To: freebsd-questions@freebsd.org Message-id: <20030722230432.J27866@asu.edu> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5.1i Subject: shell script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David.Bear@asu.edu List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 06:04:37 -0000 I'm trying to clean up a script that controls my tape better. Among other things it sets some variable to use later. I've made an error somewhere and I'm thinking that I'm missing the obvious since I cant find the error. I want to set command line options for tar. Below taroptions has what I want. Line 12 echo's the command. When I use what line echo's to the console tar works. However, something is happening with line 13 that makes tar mad. It tells me tar can't open the archive /dev/sa0 /var/log Please advice -- I'm going blind trying understand this one. 1 #!/bin/sh 2 PATH=/bin:/usr/bin 3 backupadmin="iddwb@asu.edu" 4 starttime=`date "+DATE: %Y-%m-%d%nTIME: %H:%M"` 5 wrkdir="/root" 6 tmpfile=${wrkdir}"/cat.tmp" 7 curfile=${wrkdir}"/tapelabel" 8 catalog=${wrkdir}"/level1Tar.cat" 9 datetime=`date "+DATE: %Y-%m-%d%nTIME: %H:%M"` 0 taroptions="--create --verbose --block-size 1 --read-full-blocks --block-compress --gzip --file " 1 tapedev="/dev/sa0" 2 echo "tar "${taroptions}${tapedev}" /var/log " 3 tar ${taroptions}${tapedev}" /var/log " 4 exit -- David Bear phone: 480-965-8257 fax: 480-965-9189 College of Public Programs/ASU Wilson Hall 232 Tempe, AZ 85287-0803 "Beware the IP portfolio, everyone will be suspect of trespassing"