blob: bee6316371b7a0e40c4324860a468f2c436410bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#!/bin/sh
#
###########################################################
## Invoke 'ciao_calc_ct.sh' and 'ciao_calc_csb.sh' ##
## to calculate cooling time and Csb value. ##
## ##
## Weitian LI ##
## 2014/06/18 ##
## ##
## ChangeLog: ##
## 1.1, 2014/12/11, Weitian LI ##
## test ${CT_RES} before read ##
###########################################################
BASE_PATH=`dirname $0`
SCRIPT_CT="${BASE_PATH}/ciao_calc_ct.sh"
SCRIPT_CSB="${BASE_PATH}/ciao_calc_csb.sh"
echo "### CALCULATE COOLING TIME ###"
echo "### ${SCRIPT_CT} ###"
#ciao_calc_ct.sh
${SCRIPT_CT}
echo "### CALCULATE CSB VALUE ###"
echo "### ${SCRIPT_CSB} ###"
#ciao_calc_csb.sh
${SCRIPT_CSB}
echo "### PROCESS RESULTS ###"
CT_RES="cooling_results.txt"
CSB_RES="csb_results.txt"
# cooling time
if [ -r "${CT_RES}" ]; then
TITLE_CT=`grep -E '^#\s*[A-Z]+' ${CT_RES} | awk -F',' '{ print $3 }'`
DATA_CT=`grep -E '^#\s*[0-9]+' ${CT_RES} | awk -F',' '{ print $3 }'`
else
TITLE_CT=""
DATA_CT=""
fi
# Csb
TITLE_CSB=`grep -E '^#\s*[A-Z]+' ${CSB_RES}`
DATA_CSB=`grep -E '^#\s*[0-9]+' ${CSB_RES}`
# output data
echo "${TITLE_CSB},${TITLE_CT}"
echo "${DATA_CSB},${DATA_CT}"
exit 0
|