On Wed, 1 Mar 2000, S.Toms wrote: st> On Wed, 1 Mar 2000, Jon Pennington wrote: st> st> function diskcopy { st> DEST1=${1-0} st> DEST2=${2-$DEST1} You don't need this line or the closing 'fi' line toward the bottom st> if [ -n "$DEST1" ]; then st> echo diskcopy: insert 1st floppy into drive fd$DEST1 st> if [ "$DEST1" != "$DEST2" ]; then st> echo diskcopy: insert 2nd floppy into drive fd$DEST2 st> echo contents of fd$DEST2 will be destroyed st> echo " < press any key >" st> dd if=/dev/fd$DEST1 of=/dev/fd$DEST2 st> else st> echo " < press any key >" st> read keypress st> dd if=/dev/fd$DEST1 of=/tmp/floppy.img st> echo diskcopy: insert 2nd floppy into drive fd$DEST2 st> echo contents of fd$DEST2 will be destroyed st> echo " < press any key >" st> read keypress st> dd if=/tmp/floppy.img of=/dev/fd$DEST2 st> rm -f /tmp/floppy.img st> fi this line. st> fi st> } st> Was originally going to set it up with a usage reply when no parameters are supplied, then changed my mind. A usage reply would benefit from those two lines. st> Or convert it to a seperate shell routine if you like. For those of you st> who don't know what it does, it will take from 0 to 2 parameters, you can st> either run diskcopy which, will default to fd0 or you can select your st> drives on the command line by entering the drives numerical value, (0 for st> fd0, 1 for fd1, etc..) st> ie: diskcopy (copies fd0 to fd0) st> diskcopy 0 (copies fd0 to fd0) st> diskcopy 0 2 (copies fd0 to fd2) st> diskcopy 2 0 (copies fd2 to fd0) st> etc.. st> st> Anyway, I was board at the moment, so I quickly wrote it up and tested st> it. st> st> jp> (--or--) st> jp> st> jp> <with CD1 inserted and mounted and a floppy inserted> st> jp> # dd if=/cdrom/disks/bootdisk of=/dev/fd0 st> jp> st> jp> The /disks directory on CD1 has a lot of usefull stuff in there...check the st> jp> SuSE manual for more. st> jp> st> jp> st> st> -- S.Toms - tomas@primenet.com - www.primenet.com/~tomas SuSE Linux v6.3+ - Kernel 2.2.14 "I shot an arrow into the air, and it stuck." -- Graffito in Los Angeles -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/