Platform: Linux
Build: Slackware 10.1
Kernel: 2.6.12.3
Issue: Shell Scripting

i recently wrote a shell script to automate the process of creating Foppy Disk Images on my local hard drive and the subsequent process of dumping the images back to floppy.

for the most part the script works flawlessly, it truely is a godsend for me because of all the disk dumps i would have had to hand key without it. the only trouble is that i get a strage error that i cannot pin down.

Operation output:
Code:
dragonrider@DarkStar1:~$ diskdump in WLA_test.img
I will now copy the contents of the floppy in device fd0 to the hard drive.
/cbin/diskdump: line 4: WLA_test.img: command not found
2880+0 records in
2880+0 records out

dragonrider@DarkStar1:~$ diskdump list
Listing available disk images to use

98_task1_auto.img  dos622-boot.2.img    dos622-boot.img  nsm_task1.img
WLA_test.img       dos622-boot.bak.img  gos_task1.img    win98_default_startup.img

dragonrider@DarkStar1:~$ diskdump out WLA_test.img
I will now copy a previously saved image to the floppy
/cbin/diskdump: line 13: WLA_test.img: command not found
2880+0 records in
2880+0 records out

dragonrider@DarkStar1:~$
and my shell script code:
Code:
dragonrider@DarkStar1:~$ cat /cbin/diskdump
case $1 in
    'in')
        echo 'I will now copy the contents of the floppy in device fd0 to the hard drive.';
        if $2 == ""; then
                echo 'Please Specify a name to save the disk image as!';
        else
                dd conv=notrunc,noerror if=/dev/fd0 of=/cbin_files/diskimages/$2;
        fi
        ;;

    'out')
        echo 'I will now copy a previously saved image to the floppy';
        if $2 == ""; then
                echo "Please specify a disk image file to use";
        else
                dd conv=notrunc,noerror if=/cbin_files/diskimages/$2 of=/dev/fd0;
        fi
        ;;

    'list')
        echo 'Listing available disk images to use
        ';
        ls /cbin_files/diskimages/
        ;;

    *)
        echo 'usage: '$0' [desired mode of operation]';
        echo '';
        echo 'You executed:';
        echo $0 $1 $2 $3 $4 $5 $6 $7 $8 $9;
        echo '';
        echo 'Options List:';
        echo '';
        echo ' in $name - Read in a disk image and save as $name'
        echo ' out $name - Write out a disk image with name $name';
        echo ' list - List available disk images for use';
        ;;
esac
does anyone have any idea what causes the command not found errors? and how i can fix them?