I am having trouble with using a case statement to return months. It feels so obvious I'm not sure why its stumping me so well!
month=(01 02 03 04 05 06 07 08 09 10 11 12)
case ${month[@]} in
test ${month[@]:8:1} = $(date +%m))
RPROMPT='September %D{%d %Y} %@'
;;
*)
RPROMPT='%D{%b %d, %Y} %@'
;;
esac
Yes. I do want the full name of the months, not just a three-letter abbreviation.
It's also a good refresher as I've not touch shell-script in years.
It returns the *)
case.
month=(January February March April May June July August September ...); RPROMPT="$month[$(date +%m)]"
?