From b938d6ad54f1e78219559d74e3be6cbb3d949cf8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Sep 2011 16:38:12 +0200 Subject: //json/sh/json.sh: use BRE @sed --- json/sh/json.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'json') diff --git a/json/sh/json.sh b/json/sh/json.sh index 2a64d371..79f8529a 100755 --- a/json/sh/json.sh +++ b/json/sh/json.sh @@ -6,23 +6,23 @@ set -euf # XXX json_key is something like PWD^^ normalize_json() { - sed -rn ' + sed -n ' 1s/^/cat<&2 #json_set object "`set | sed -rn "s/^(${json_key}_[a-zA-Z]+)_VALUE=(.*)/\1/p"`" - json_set object "`set | sed -rn "s/^(${json_key}_[a-zA-Z]+)=(.*)/\1/p"`" + json_set object "`set | sed -n "s/^\(${json_key}_[a-zA-Z]\+\)=\(.*\)/\1/p"`" } begin_json_array() { :; } end_json_array() { :; } -- cgit v1.2.3