#!/bin/csh # Fuss-less method for drawing attention to a disk in a Sun's drive # and then display directory. Also spots unformatted disks and offers # commands to DOS format a disk... # * Works properly when "sourced" * volcheck @ w=$status if ( $w == 0 ) then echo "No disk in drive or drive fault." exit 1 endif set w = `ls /vol/dev/rdiskette0` if ( $w == "unformatted" ) then echo "Disk in drive is unformatted." echo "" echo "Use fdformat -U -opts -b diskname" echo "\*See manpage for fdformat first!\*" echo "'fdformat -d -D -U -b name' for DOS 720K" echo "'fdformat -d -U -b name' for DOS 1.44M" exit 2 endif cd /floppy/floppy0 echo 'Now in disk directory' ls -la