I know that I can easily get positioned parameters like this in bash:
$0 or $1
$0
$1
I want to be able to use flag options like this to s
#!/bin/bash if getopts "n:" arg; then echo "Welcome $OPTARG" fi
Save it as sample.sh and try running
sh sample.sh -n John
in your terminal.