I wonder why the test [[ ! -v 1 ]]
fails no matter if I pass the 1st positional parameter to the function below:
shopt -os nounset
function foo {
echo -n "$FUNCNAME: 1st positional parameter "
[[ ! -v 1 ]] && echo "is missing." || echo is "\"$1\"."
}
I know there are other ways to test but why doesn't this particular test work?