When running this part of my bash script am getting an error
Script
value=0 for (( t=0; t <= 4; t++ )) do d1=${filedates[$t]} d2=${filedates[$t+1]
For 'mm' and 'dd' values in dates, I use this trick:
mm="1${date:5,2}" # where 5 is the offset to mm in the date let mm=$mm-100 # turn 108 into 8, and 109 into 9