diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-05-17 16:29:59 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-05-17 16:30:00 +0400 |
commit | 94ff2a0abb2938dc84cc46e513f0d039cacbe40a (patch) | |
tree | 22cc1ac37c0a68ca53bcacb53657790e80069580 /sh | |
parent | 592f2dbd82c6cb9f85332c8056eed58374ac6dd0 (diff) |
sh/jshn.sh: fix allowing numbers in identifiers
json_add_generic() needs to handle them as well
Diffstat (limited to 'sh')
-rw-r--r-- | sh/jshn.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -24,7 +24,7 @@ json_add_generic() { var=$(( ${aseq:-0} + 1 )) export -- "SEQ_$cur=$var" else - local name="$(echo -n "$var" | tr -C '[a-zA-Z_]' _)" + local name="$(echo -n "$var" | tr -C '[a-zA-Z0-9_]' _)" [[ "$name" == "$var" ]] || export -- "NAME_${cur}_${name}=$var" var="$name" fi |