INSTRUCTIONS: (1) Save this file. On a netscape browser, select the `File' menu and then `Save As...'. (2) Edit the saved file (tape_extract) (3) Make the saved file executable using the command: chmod u+x tape_extract (4) issue the command `tape_extract' and follow the instructions. --------------------Delete this and all above lines-------------------- #!/bin/csh -f # J.Brewer 1996 # Comments to: jbrewer@eso.org set bs = 2880 # set bs = 28800 # Unedit this line for WFI data echo -n " How many files to be extracted? " set number = $< echo -n " Number of first file? " set start = $< echo -n " Root? " set root = $< echo -n " Extension? " set ext = $< echo -n " Name of drive (e.g. /dev/nrst0) ? " set tape = $< set stop = `expr $start + $number` @ n=$start while ($n < $stop) if ($n < 10) then set n = 00$n else if ($n < 100) then set n = 0$n endif endif set op = $root$n.$ext if (-e $op) then echo $op "exists, overwrite? (y/n) " set reply = $< if ($reply == 'y') then rm $op else echo "Exiting..." exit (-1) endif endif echo " " echo "Reading file "$op dd if=$tape of=$op bs=$bs @ n += 1 end echo -n " Rewind and eject tape (y/n)? " set reply = $< if ($reply == 'y') then mt -f $tape offline endif exit(0)