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
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
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.
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
4 matches
Mail list logo