[gentoo-user] what is wrong with script

2005-08-30 Thread bshlists
I've been trying run this script on my gentoo laptop, but for some reason it does not work. If you see what is wrong could you email me. Thanks. #!/bin/bash if [ ${ACTION} = add ] [ -f ${DEVICE} ] then rmmod garmin_gps chmod 666 $DEVICE fi -- DWW -- gentoo-user@gentoo.org

Re: [gentoo-user] what is wrong with script

2005-08-30 Thread Christoph Gysin
bshlists wrote: I've been trying run this script on my gentoo laptop, but for some reason it does not work. If you see what is wrong could you email me. Thanks. #!/bin/bash if [ ${ACTION} = add ] [ -f ${DEVICE} ] then rmmod garmin_gps chmod 666 $DEVICE fi $ man test

Re: [gentoo-user] what is wrong with script

2005-08-30 Thread Matt Randolph
Have a look at the comp.unix.shell newsgroup. There are some insanely talented people in there dispensing free advice. bshlists wrote: I've been trying run this script on my gentoo laptop, but for some reason it does not work. If you see what is wrong could you email me. Thanks.

Re: [gentoo-user] what is wrong with script

2005-08-30 Thread Alvin A ONeal Jr
From the looks of the script you aren't testing for a regular file, hence -f doesn't work. I tested it on my machine WORKS: ACTION=add DEVICE=/tmp/testfile DOESN'T WORK: ACTION=add DEVICE=/dev/sda1 SCRIPT: #!/bin/bash if [ ${ACTION} == add ] [ -f ${DEVICE} ]; then echo