when I run this script in my Ubuntu:
   for item in *
do
    if  [ -d $item ]
    then
        echo $item
    fi
done
I got this output: output
I don't understand why I get "[: if-then: unexpected operator"
when I run this script in my Ubuntu:
   for item in *
do
    if  [ -d $item ]
    then
        echo $item
    fi
done
I got this output: output
I don't understand why I get "[: if-then: unexpected operator"
