Always wondered this, but never fully investigated - is there any way to get named parameters in bash?
For example, I have this:
function ql_maybe_fail {
if [[ "$1" == "true" ]]; then
echo "quicklock: exiting with 1 since fail flag was set for your 'ql_release_lock' command. "
exit 1;
fi
}
is it somehow possible to convert it to something like this:
function ql_maybe_fail (isFail) {
if [[ "$isFail" == "true" ]]; then
echo "quicklock: exiting with 1 since fail flag was set for your 'ql_release_lock' command. "
exit 1;
fi
}