I am trying to do arithmetic as I assign a variable a value. When the script reaches end_day it cannot do the math, and when I test it in the terminal it will simply return the expression. What do I need to do to get a result assigned to the variables.
Here is part of the script, $fhour
comes from elsewhere and is simply a two digit number.
#Date variables
export start_year=$(date -u +%Y)
export start_mon=$(date -u +%m)
export start_day=$(date -u +%d)
export start_hour=$fhour
export end_year=$(date -u +%Y)
export end_mon=$(date -u +%m)
export end_day=${$start_day+(((($start_day*24)+84)/24)-((($start_day*24)+84)%24))}
export end_hour=${($start_day*24+84)%24}
Thanks for any help!