Update default.inc

This commit is contained in:
2022-03-19 23:08:34 -05:00
parent 19777c1b18
commit 1bfcd9177d

View File

@@ -27,6 +27,16 @@ else
exit 1
fi
is_array()
{ #detect if arg is an array, returns 0 on sucess, 1 otherwise
[ -z "$1" ] && return 1
if [ -n "$BASH" ]; then
declare -p ${1} 2> /dev/null | grep 'declare \-a' >/dev/null && return 0
fi
return 1
}
declare -A abet
abet[0]="a"
abet[1]="b"