26 lines
364 B
Bash
26 lines
364 B
Bash
|
#!/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 "${@}"
|