Write ~/is-there.sh. It takes one path.
- With no argument: write
usage: is-there.sh PATHand end with exit code 2. - If the path is a file: write
file. - If the path is a directory: write
directory. - Else: write
missingand end with exit code 1.
Use [ $# -eq 0 ], [ -f "$1" ] and [ -d "$1" ], with if, elif and else.