#/bin/bash mkdir foo if [ -d foo ]; then echo "foo directory found." fi if [ -e foo ]; then echo "foo file found." fi rmdir foo if [ ! -d foo ]; then echo "foo directory not found." fi