better-comments-next
better-comments-next copied to clipboard
Shellscript: '#' in Bash internal variable "$#" shouldn't be treated as a comment character.
See screenshot below. The ! is part of an arithmetic operator, but is interpreted as a better-comments-next tag.
There should be something wrong before this line, show me the full code.
~~~~~ in the first line is a BCN tag.
# ~~~~~[Block:arg_validation]...
{
if (($# != 3)); then
l0gCode_return "$E_MISSING_OR_EXTRA_ARGS"
elif [ -z "$1" ] || [ -z "$2" ]; then # verify that args 1 & 2 are non-null
l0gCode_return "$E_NULL_OR_MISSING_ARG"
elif ! isIntP "$3"; then # verify that arg 3 is a positive int
l0gCode_return "$E_INVALID_ARG" \
"Third arg, 'days_older_than_to_delete', must be a positive int."
else
:
fi
} || {
((rtn_code = $?))
l0ginfo "$usage"
return $rtn_code
}