Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2003 23:04:32 -0700
From:      David Bear <David.Bear@asu.edu>
To:        freebsd-questions@freebsd.org
Subject:   shell script help
Message-ID:  <20030722230432.J27866@asu.edu>

next in thread | raw e-mail | index | archive | help
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"



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