I am trying to write some small script file that will check if a USB stick is connected to my pc or not. I can't seem to get it to work, but I am sure it is a very simple fix.
here is what I have in my file:
usb_path = "/media/disk/"
if[ -f $usb_path ]
echo "path exists"
echo "path does not exist"
I named my file as: check_usb.sh
and I changed permissions: chmod 755 check_usb.sh
The error I keep getting is this:
./check_usb.sh: line 3: usb_path: command not found
I am running on Fedora core 10.
Can anyone help me figure out what the problem is?
If I run these lines through console it works fine (meaning, I type the commands in this file straight in the command line/console).
thanks in advance.