Hello all
I just dont understand this anymore, maybe its just late or something but this is killing me. Whats wrong with this?
The if statement is giving me this error line 225 is that if statement. If i remove it the code works fine.
Thanks!
I just dont understand this anymore, maybe its just late or something but this is killing me. Whats wrong with this?
Code:
dirname=${fspec#/}
dirname=${dirname%/*}
echo "$dirname" >&2
if [ $dirname != $previousdir ]; then
echo "YESSSSSSSSSSSSS" >&2
else
echo "Allready done" >&2
fi
previousdir=$dirname
The if statement is giving me this error line 225 is that if statement. If i remove it the code works fine.
Code:
line 225: [: too many arguments
Thanks!