college/Summer-2024/CS-3424/Assignments/Assignment-0/a0.bash

26 lines
364 B
Bash
Raw Normal View History

2024-06-02 13:22:35 -05:00
#!/usr/bin/env -S nix shell nixpkgs#bash --command bash
set -eEuo pipefail
usage() {
cat <<-__EOS__
Usage: ${0} <firstName> <lastName>
__EOS__
exit 0
}
main() {
if (($# < 2)); then
usage
fi
cat <<-__EOS__
My name is ${1} ${2}
I am running this script from $(pwd)
My username is $(whoami)
I am logged in to $(hostname)
__EOS__
}
main "${@}"