Instead of doing this:
local pod=$1
if [[ -z ${pod} ]]; then
echo "pod is required, aborting!"
return
fiYou can just do this:
local pod="${1:?pod is required, aborting!}" $ cat wiki/programming/bash/required-variable.md
Instead of doing this:
local pod=$1
if [[ -z ${pod} ]]; then
echo "pod is required, aborting!"
return
fiYou can just do this:
local pod="${1:?pod is required, aborting!}"