#!/bin/bash if [ -d "/path/to/directory" ]; then echo "Directory exists" else echo "Directory does not exist" fi