aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/make_infojson.sh
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2014-12-05 20:44:53 +0800
committerWeitian LI <liweitianux@gmail.com>2014-12-05 20:44:53 +0800
commit18ec6e75828a442f8da29be13e88c5197e15f886 (patch)
tree4ef21f232d80f3eed6f1512023143f850811e4f1 /scripts/make_infojson.sh
parent3ba0f1a931446889b31ac3d87c193b3195d9c722 (diff)
downloadchandra-acis-analysis-18ec6e75828a442f8da29be13e88c5197e15f886.tar.bz2
make_infojson.sh: replace '\s+' with '[[:space:]]+'
Old grep versions does not support '\s+' regex
Diffstat (limited to 'scripts/make_infojson.sh')
-rwxr-xr-xscripts/make_infojson.sh8
1 files changed, 6 insertions, 2 deletions
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 <liweitianux@gmail.com>
# 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