path=$foo/$bar
if [[ $path =~ [[:space:]]*/[[:space:]]* ]]; then
echo NOPE
else
rm -rf $path
fi path=$foo/$bar
if [[ $path =~ [[:space:]]*/[[:space:]]* ]]; then
echo NOPE
else
rm -rf $path
fiNo comments yet.