Skip to content

Instantly share code, notes, and snippets.

@canabady
Last active November 21, 2018 10:03
Show Gist options
  • Save canabady/84cfc32394d921402e182a65b6aa9359 to your computer and use it in GitHub Desktop.
Save canabady/84cfc32394d921402e182a65b6aa9359 to your computer and use it in GitHub Desktop.
List month names in Title case, Lower case and Upper case
# List month names in Title case, Lower case and Upper case
$ for i in {1..12}; do month=$(date -d "$i/01" +%b); echo "${month} ${month,,} ${month^^}"; done
# Output
# Jan jan JAN
# Feb feb FEB
# Mar mar MAR
# Apr apr APR
# May may MAY
# Jun jun JUN
# Jul jul JUL
# Aug aug AUG
# Sep sep SEP
# Oct oct OCT
# Nov nov NOV
# Dec dec DEC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment