How can I veify a folder name in a bash script.
I am in the folder named "test". Now I want to check the is really "text".
I have tried the following:
cd tmp
mkdir testfolder
cd testfolder
if [["${PWD##*/}"]] == "testfolder"
then echo "ok"
fi
done
But always get the error, that testfolder not found, it tries to run if as a command.
Thanks