if [[ -d "$HOME/test_bash/$KIT.stat_$KIT" ]; then
echo $KIT
else
mkdir $KIT.stat_$KIT
fi
if [[ "14"=="14" ]]; then
echo "FOO"
fi
The first if statement with [[ -d does not work, but the second if statement “14”==”14″ does work when I use the bash test.sh command. However, if I replace the first if statement ‘[[‘ with a single bracket ‘[‘, it works. Any idea why this is the case?
You only have a single closing
]on your first line.