#!/bin/sh #File: /home/accounts/kscott/work/src/getdisk #Author: K. Scott Rowe #Time-stamp: <08/29/1997 16:27:06 kscott@pescado.tcct.nmt.edu> PATH=/bin:/usr/bin:/usr/local/bin ; export PATH DIRECTORY=/fs/tcc/getdisk USAGE="Usage: `basename $0` [], where is one of the following" numdisks=`ls -1 ${DIRECTORY}/${1}* | cut -d'-' -f2 | tail -1` notdone="1" clear if [ "$1" = "" -o "$1" = "-h" -o ! -f ${DIRECTORY}/${1}.dd-1 ] ; then echo ${USAGE} echo cd ${DIRECTORY} ; ls -1 *.dd* | cut -d'.' -f1 | uniq exit fi echo "There are $numdisks disk(s) in this disk set" echo "Insert disk 1" echo "Press RETURN to begin..." read blah for x in ${DIRECTORY}/${1}.dd* ; do echo dd if=${x} of=/dev/fd0 bs=8192 if [ "$numdisks" = "1" ] ; then break fi numdisks=`echo "${numdisks} 1 - p" | dc` echo echo "There are $numdisks disk(s) left in the disk set" echo "Insert the next disk" echo "Press RETURN to continue..." read blah done