#/bin/bash mkdir foo touch bar if [ -e foo ]; then echo "foo found." if [ -d foo ]; then echo "foo is directory." fi if [ -f foo ]; then echo "foo is file." fi fi if [ -e bar ]; then echo "bar found." if [ -d bar ]; then echo "bar is directory." fi if [ -f bar ]; then echo "bar is file." fi fi rmdir foo rm bar