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]
You don't need the $ and the {} in an arithmetic expansion expression. It should look like this:
$
{}
compare=$((SEC/(60*60*24)))