#!/bin/sh # # /usr/doc/backuponcd/samples/simple_read # a very simple example how to read an archive stored on # several CDs. Must be killed by typing ^C if reading is # finished. # device="0,3,0" rawdevice=/dev/cdrom mountpt=/cdrom while true; do cdrecord dev=$device -eject > /dev/null 2>&1 echo -e "\a\n Please insert the (next) volume" > /dev/tty read ans mount -t iso9660 -o ro,noexec $rawdevice $mountpt if test $? -eq 0; then echo "Now reading the volume..." > /dev/tty cat /cdrom/*gz* else echo -e "\a\n Mount failed." > /dev/tty fi umount $mountpt done 2> /dev/tty < /dev/tty