portable `rewind' for tape devices

Bruce R. Larson ires at kaspar.UUCP
Thu Nov 29 13:13:56 AEST 1990


I've been looking for a portable `rewind' to use in shell scripts,
and I may have found (or more likely, reinvented) the perfect solution.
I am posting this because it answers the rewind question raised in FAQ #5.

Here are a couple of Bourne shell functions to
i)  rewind the tape device, and
ii) advance to the next archive on the tape.


TAPE=dev/tape
NTAPE=/dev/ntape

rewind_tape(){
	dd if=$TAPE of=/dev/null count=0 2>/dev/null
}

advance_tape(){
	dd if=$NTAPE of=/dev/null count=0 2>/dev/null
}


It works for me!

Bruce

Bruce R. Larson				| The drug problem in the US is so
Integral Resources, Milton MA		|  vast that we need to recognize that
Internet: ires.com!blarson at cs.umb.edu	|   it is primarily a social problem,
Uucp:     ..!cs.umb.edu!ires.com!blarson|    not a criminal problem.
-- 



More information about the Comp.unix.sysv386 mailing list