Commit 1b271a60 authored by Marc-Antoine Drouin's avatar Marc-Antoine Drouin
Browse files

Merge branch 'slice_fix' into 'master'

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

See merge request !1
parents d364733a 2a53b2d6
......@@ -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