Hi guys i want to get the number of days in next month in a variable so i can loop through it so far i have
but it s giving the errorcal $(date +"%m %Y" --date "next month") | awk 'NF {DAYS = $NF}; END {print DAYS}' > temp
DAYS_IN_NEXT_MONTH=$(cat temp)
for (( c=1; c<=$DAYS_IN_NEXT_DATE; c++ ))
do
echo $c
done
Ive used variable in a for next loop before so don't understand why this isn't working ? any give me a heads up[ and id be grateful
((: c<=: syntax error: operand expected (error token is "<=")
Cheers Pete
Bookmarks