Why do I keep getting the same error in my bash script?
Hello
I keep getting this error over and over. What am I doing wrong? Quote:
Code:
#!/bin/bash |
Change this:
if [ ! -d /mnt/sdb1/photos/keep] to this: if [ ! -d "/mnt/sdb1/photos/keep"] and change this: ]elif [ ! -d /home/server/MOM/Photos/keep] to this: elif [ ! -d "/home/server/MOM/Photos/keep"] The error reported the missing opening quote (although it showed a single quote instead of double quote). |
Actually, it says
Quote:
No quotes reqd. I recommend double [[ ]] anyway: http://tldp.org/LDP/abs/html/testcon...ml#DBLBRACKETS Quote:
|
Quote:
Ive messed with it for a while and am still scratching my head. :banghead: [edit] Chris thanks for the post. I missed it before replying. Ill give it a try. |
you need to add a space before "]"
if [ "test" == "test" ]; then echo test fi |
@Elv13: see my post #3
|
BTW the space was what I needed
Thanks |
All times are GMT -5. The time now is 05:36 PM. |