Merge pull request #3 from denouche/bash41

fix: assure compatibility with bash 4.0 and 4.1
pull/4/head
Antoine Leveugle 2016-05-25 21:46:58 +02:00
commit 4ca8512f56
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ getJSONFieldString()
JSON="$1"
FIELD="$2"
RESULT=$(echo $JSON | $CURRENT_PATH/$LIBS/JSON.sh | grep "\[\"$FIELD\"\]" | sed -r "s/\[\"$FIELD\"\]\s+(.*)/\1/")
echo ${RESULT:1:-1}
echo ${RESULT:1:${#RESULT}-2}
}
main()