Files
exercism/bash/error-handling/error_handling.sh
2021-08-08 21:11:22 +02:00

13 lines
325 B
Bash
Executable File

#!/usr/bin/env bash
#
# Note: I don't like the test on empty arg or whitespaces only arg:
# 'error_handling.sh ""' and 'error_handling.sh " "'
# should be faulty, instead of displaying a strange message ("Hello, ")
usage() {
echo "Usage: ./error_handling <greetee>"
exit 1
}
(( $# != 1 )) && usage
echo "Hello, $1"