cs-3424: finish assignment 0
This commit is contained in:
parent
52ab3dad2b
commit
f835c6b3e5
BIN
Summer-2024/CS-3424/Assignment-0/Assignment.pdf
Normal file
BIN
Summer-2024/CS-3424/Assignment-0/Assignment.pdf
Normal file
Binary file not shown.
25
Summer-2024/CS-3424/Assignment-0/a0.bash
Executable file
25
Summer-2024/CS-3424/Assignment-0/a0.bash
Executable 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 "${@}"
|
Loading…
Reference in New Issue
Block a user