ifs fix
This commit is contained in:
parent
d17a448e66
commit
4ad3e475f8
@ -47,20 +47,23 @@ function analyze {
|
||||
rm -f ${g_tmp}/interim-${tmpfile}
|
||||
rm -f ${g_tmp}/output-${tmpfile}
|
||||
|
||||
local f_ORIGIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
#local f_ORIGIFS="$IFS"
|
||||
#IFS=$'\n'
|
||||
|
||||
# Chart Part
|
||||
echo "$(head -n1 ${file}),Market Perrormance,Score,Buy Score,Sell Score,InTrade,Inetrim Result" >analyze-${analyzedate}/chart-${tmpfile}
|
||||
# Chart Part End
|
||||
|
||||
for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,')
|
||||
#for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,')
|
||||
local f_lines
|
||||
mapfile -t f_lines <<<$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,')
|
||||
for line in "${f_lines[@]}"
|
||||
do
|
||||
# Chart Part
|
||||
f_sell_score=""
|
||||
f_buy_score=""
|
||||
# Chart Part End
|
||||
IFS=$f_ORIGIFS
|
||||
#IFS=$f_ORIGIFS
|
||||
current=$(echo $line | cut -d, -f2)
|
||||
time=$(echo $line | cut -d, -f1 | cut -d: -f1,2)
|
||||
f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//')
|
||||
|
Loading…
Reference in New Issue
Block a user