cs-3424: finish assignment 0

This commit is contained in:
Price Hiller 2024-06-02 13:22:35 -05:00
parent 52ab3dad2b
commit f835c6b3e5
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
2 changed files with 25 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,25 @@
#!/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 "${@}"