#!/bin/bash set -e read -rp "Path: " input_path if [[ -f "$input_path" ]]; then echo "It's a file." elif [[ -d "$input_path" ]]; then echo "It's a directory." else echo "It's neither." fi