/^(true|false)$/ { print "bool\n"; next; }
/^\d+$/ { print "integer\n"; next; }
/^"[^"]*"$/ { print "string\n"; next; }
-/^[0-9a-fA-F]{2,2}(:[0-9a-fA-F]{2,2})*$/ { print "string\n"; next; }
+/^[0-9a-fA-F]{2,2}(:[0-9a-fA-F]{2,2})*$/ { print "hexstring\n"; next; }
{ print "other\n"; next; }
'
}
for value in $values; do
# detect type of $value and quote if necessary
case $(typeof "$value") in
- ip|bool|integer|string)
+ ip|bool|integer|string|hexstring)
;;
other)
value="\"$value\""