Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-11 13:46:44 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-09-11 13:46:44 +0400
commit738884e7469969a0b30a077820f60ff0a1e37ac2 (patch)
tree4e8744e26997a8a97b4650eccbdf565fe5b47f4c /sh
parenta1a97eb11e89c420b84a659a88a4e72c7f04367d (diff)
same for json_get_var
Diffstat (limited to 'sh')
-rw-r--r--sh/jshn.sh2
1 files changed, 1 insertions, 1 deletions
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}\""
}