Get new row function

Adade

New Member
Credits
45
Please i wrote script that suppose insert data from the server to an excel sheet every hour, however it keeps over writing in the same row eg: 00:00 oclock row instead of moving to the next row every hour. please function below and assist. will be very grateful for help. i have a python script that does the routing of data already this bash function is just suppose to direct the row or where to put data.
##=======================

get_row_number ()
{
local start=$(date --date="$START_DATE" +%s) extra=3
local end=$(date --date="$1" +%s)
local difference=$((end-start))
QUOTIENT=$(($((difference / 86400))+extra))
return 0
}

get_row () { get_row_number "$1" && echo $QUOTIENT; }

START_DATE=$(date --d='now' '+%H:00:00') # beginning row date on the current spreadsheet
rowval=$(get_row "$ydate")


#see how the report looks like.

I need the function to move to the next row (move to new row but it keep over writing in the same row)every time the script runs.
0:00:00
1:00:00
2:00:00
3:00:00
4:00:00
5:00:00
 


Members online


Top