#!/bin/sh # shell script to use to restore 312f97.tgz # Created by fdsplit Sun Aug 1 14:45:33 EDT 1999 # -rw-r--r-- 1 bynum faculty 2238027 Jul 30 14:28 312f97.tgz # -rw-r--r-- 1 bynum faculty 1452032 Aug 1 14:45 312f97.aa # -rw-r--r-- 1 bynum faculty 785995 Aug 1 14:45 312f97.ab sysbin=/usr/local/bin:/usr/local/gnu/bin:/bin:/usr/bin:/usr/lib otherbin=$HOME/bin:/home/mom4/bynum/bin PATH=$sysbin:$otherbin:. OS=`uname -s` echo "Restoring the file 312f97.tgz from floppies" if (test -f 312f97.tgz) then while (true) do echo -n "The file 312f97.tgz exists. OK to overwrite? (y or n) " read ans case $ans in Y*|y*) break;; N*|n*) echo "File 312f97.tgz not modified" exit 0;; esac done fi echo "You will need 2 floppies containing the files" echo " 312f97.aa 312f97.ab" echo -n "Press RETURN when you have them " read dummy firsttime=T for i in 312f97.aa 312f97.ab do case $OS in Sun*) eject;; *) case $firsttime in T) firsttime=F ;; F) echo "Remove floppy from drive" ;; esac esac if (test -f $i) then while (true) do echo -n "File $i exists. OK to overwrite? (y or n) " read ans case $ans in y*|Y*) while (true) do echo -n "Insert floppy containing $i and press \"x\", then RETURN " read ans2 case $ans2 in x) mdir a:$i >& /dev/null if (test $? != 0) then echo "File $i is not on the floppy" else break fi;; esac done rm -f $i mcopy a:/$i . break ;; n*|N*) echo "File $i was not overwritten" break;; *) ;; esac done else mcopy a:$i . fi done case $OS in Sun*) eject;; *) echo "Remove floppy from drive" ;; esac cat 312f97.aa 312f97.ab > 312f97.tgz echo Original file size: echo "-rw-r--r-- 1 bynum faculty 2238027 Jul 30 14:28 312f97.tgz" echo Restored file size: ls -l 312f97.tgz