#/bin/bash touch foo if [ -f foo ]; then echo "foo file found." fi if [ -d foo ]; then echo "foo directory found." fi rm foo if [ ! -f foo ]; then echo "foo file not found." fi