Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Apr 2000 09:27:20 -0400
From:      Alan Clegg <abc@firehouse.net>
To:        Ian Cartwright <ICartwright@IT.RJF.com>
Cc:        "FreeBSD Questions (E-mail)" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Script help
Message-ID:  <20000426092720.D46589@ecto.greenpeas.org>
In-Reply-To: <6D5097D4B56AD31190D50008C7B1579B670269@EXLAN5>; from ICartwright@IT.RJF.com on Wed, Apr 26, 2000 at 09:18:43AM -0400
References:  <6D5097D4B56AD31190D50008C7B1579B670269@EXLAN5>

next in thread | previous in thread | raw e-mail | index | archive | help
Out of the ether, Ian Cartwright spewed forth the following bitstream:
> Hi!
> 
> I need a little help with a simple script. I come from the MS-DOS word, so I
> constructed this script like a batch file, but as soon as it executes the
> first command it stops... If some kind soul would point me in the right
> direction, I would appreciate it. None the shell scripting tutorials I have
> found on the Web appear to cover what I am trying to do...

Well, when you:

exec /usr/bin/mt -f /dev/rsa0 erase 0 

You are overlaying the current shell (your script) with the /usr/bin/mt
command.  When mt exits, it returns to the calling shell and not to your
script.

Get rid of all of the 'exec' statements (ie, make the above into):
/usr/bin/mt -f /dev/rsa0 erase 0

And see if that does what you want.

BTW, are you *SURE* you want to erase each tape every time you do backups?

I'd recommend against it (not knowing if the drive really writes over the
tape or not) for the simple reason of not wearing out the tape/drive.

AlanC


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?20000426092720.D46589>