I need only the business date (Mon-Fri) from the below (in bash)
#!/bin/bash
startdate=20141030
enddate=20141120
dates=()
for (( date="$startdate"; date != enddate; )); do
dates+=( "$date" )
date="$(date --date="$date + 1 days" +'%Y%m%d')"
done
echo "${dates[@]}"