[ale] Bash script

David Hamm dhamm at itserve.com
Mon Apr 1 17:48:05 EST 1996


I am developing a genuine hate for the bash parser the following shell =
script creats the output listed below it.  The script works but it emits =
an error.  Can anyone tell me where I'm going wrong?

********** the shell script
#!/bin/sh
CDROM=3D`grep cdrom /etc/mtab`
if [ -n $CDROM ]; then
        echo Mounting Cdrom under /cdrom
        mount -r -t iso9660 /dev/cdrom /cdrom

else
        echo Unmounting Cdrom mounted under /cdrom
        umount /cdrom
        sleep 1
        eject
fi                 =20

********* the output **********
/usr/bin/cdrom: [: too many arguments
Unmounting Cdrom mounted under /cdrom  






More information about the Ale mailing list