I need to take the Epoch number followed by the date and time in 15 minute intervals. The result should be something like this:
1376708400|2013-08-17 00:00:00
1376709300|2013-08-17 00:15:00
1376710200|2013-08-17 00:30:00
1376711100|2013-08-17 00:45:00
1376712000|2013-08-17 01:00:00
1376712900|2013-08-17 01:15:00
1376713800|2013-08-17 01:30:00
1376714700|2013-08-17 01:45:00
1376715600|2013-08-17 02:00:00
1376716500|2013-08-17 02:15:00
1376717400|2013-08-17 02:30:00
… And so on… In the total I should have 96 lines.
My biggest doubt right now is how can I increment (or sum) the minutes by 15 minutes, I have tried this (Forgive my mess, I’m still learning):
i=96
_incrementatime='+15 minutos'
count=1
_Date=$(`date "2013-08-29 00:00:00"`)
_dataEmSeg = `date -d "2013-08-29 00:00:00" +%s`
while test $i -ne 0
do
_VarData=$(`date --date="$_incrementatime*count"`)
_exprt=$(expr `$_Date+$_VarData`)
echo "$_dataEmSeg e $_exprt "
i=$((i-1))
count=$((count+1))
done
If anyone can give me some directions to resolve this, I’d be very grateful.