From d5d384b0ba390b39fdca07919f3e3831afc712c2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 23 Nov 2014 19:25:39 +0100 Subject: [PATCH] jshn: improve performance by using let instead of $(( )) Signed-off-by: Felix Fietkau --- sh/jshn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/jshn.sh b/sh/jshn.sh index 5db1667..f5cf1d2 100644 --- a/sh/jshn.sh +++ b/sh/jshn.sh @@ -42,7 +42,7 @@ _json_inc() { # var=$1 # dest=$2 - eval "${JSON_PREFIX}$1=\$(( \${${JSON_PREFIX}$1:-0} + 1))${2:+; $2=\"\$${JSON_PREFIX}$1\"}" + let "${JSON_PREFIX}$1 += 1" "$2 = ${JSON_PREFIX}$1" } _json_add_generic() { -- 2.25.1