I need some help here, I'm not a expert with shell scripting but I am trying to do a script where I need to take the Epoch number followed by the date, but for with the all hours of the day with a interval of 15 minutes. The result will 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
In the total I'll have 96 lines, my biggest doubt right now is how i can increment (or sum) the minutes by 15 minutes, i have tried this
My full script right now is this (I know is terrible, but I'm not a truly programmer. I'm 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 someone can give me the directions to resolve this I`ll be very thankfull.