From 18ec6e75828a442f8da29be13e88c5197e15f886 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Fri, 5 Dec 2014 20:44:53 +0800 Subject: make_infojson.sh: replace '\s+' with '[[:space:]]+' Old grep versions does not support '\s+' regex --- scripts/make_infojson.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/make_infojson.sh b/scripts/make_infojson.sh index 34f9f7c..17fd2a8 100755 --- a/scripts/make_infojson.sh +++ b/scripts/make_infojson.sh @@ -10,6 +10,10 @@ # Weitian LI # 2014/06/24 # +# ChangeLog: +# v1.1, 2014/12/05, Weitian LI +# regex '\s+' not supported by old grep version, change to use '[[:space:]]+' +# ## usage, help {{{ case "$1" in @@ -132,8 +136,8 @@ SPC_CFG=`readlink -f ${IMG_DIR}/spc_fit.cfg` punlearn dmkeypar OBSID=`dmkeypar "${EVT2_CLEAN}" OBS_ID echo=yes` NAME=`dmkeypar "${EVT2_CLEAN}" OBJECT echo=yes` -Z=`grep -E '^z\s+' ${MASS_SBP_CFG} | awk '{ print $2 }'` -NH=`grep -E '^nh\s+' ${SPC_CFG} | awk '{ print $2 }'` +Z=`grep -E '^z[[:space:]]+' ${MASS_SBP_CFG} | awk '{ print $2 }'` +NH=`grep -E '^nh[[:space:]]+' ${SPC_CFG} | awk '{ print $2 }'` R500=`grep -E '^r500=' ${MASS_RES} | awk '{ print $2 }'` # generate info json file -- cgit v1.2.2