Commit 2a53b2d6 authored by GIBEK Antoine's avatar GIBEK Antoine
Browse files

Remove selection from upper bounds with ncks by introducing bc command (that...

Remove selection from upper bounds with ncks by introducing bc command (that treat with floats) and by removing just one secondfrom the end of the day
parent d364733a
......@@ -242,10 +242,10 @@ if [[ $? == 0 ]]
then
# suppression des donnees qui ne correspondent pas au jour
#-------------------------------------------------------------------------
date_as_days=$(($(date -u -d "$date" +%s)/86400))
date_p1=$(($date_as_days + 1))
date_as_days=$(bc -l <<< "$(date -u -d "$date" +%s)/86400")
date_p1=$(bc -l <<< "($(date -u -d "$date" +%s)+86399)/86400")
cmd="$NCKS -h -O -d time,${date_as_days}.0,${date_p1}.0 $tmpfile $fich_sortie"
cmd="$NCKS -h -O -d time,${date_as_days},${date_p1} $tmpfile $fich_sortie"
consignerMsg "suppression des données n'appartenant au jour traite"
eval $cmd
......
......@@ -243,10 +243,10 @@ if [[ $? == 0 ]]
then
# suppression des donnees qui ne correspondent pas au jour
#-------------------------------------------------------------------------
date_as_days=$(($(date -u -d "$date" +%s)/86400))
date_p1=$(($date_as_days + 1))
date_as_days=$(bc -l <<< "$(date -u -d "$date" +%s)/86400")
date_p1=$(bc -l <<< "($(date -u -d "$date" +%s)+86399)/86400")
cmd="$NCKS -h -O -d time,${date_as_days}.0,${date_p1}.0 $tmpfile $fich_sortie"
cmd="$NCKS -h -O -d time,${date_as_days},${date_p1} $tmpfile $fich_sortie"
consignerMsg "suppression des données n'appartenant au jour traite"
eval $cmd
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment