From 738884e7469969a0b30a077820f60ff0a1e37ac2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 11 Sep 2011 11:46:44 +0200 Subject: [PATCH] same for json_get_var --- sh/jshn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/jshn.sh b/sh/jshn.sh index 8ecefcf..d325460 100644 --- a/sh/jshn.sh +++ b/sh/jshn.sh @@ -100,7 +100,7 @@ json_get_type() { json_get_var() { local dest="$1" - local var="$2" + local var="$(echo -n "$2" | tr -C '[a-zA-Z_]' _)" eval "export -- \"$dest=\${${JSON_CUR}_$var}\"" }