#!/bin/sh
current_month=$(date +%m)
current_year=$(date +%Y)
if [ $current_month -eq 1 ]; then
prev_month=12
prev_year=$((current_year - 1))
else
prev_month=$((current_month - 1))
prev_year=$current_year
fi
case $prev_month in
01) prev_month_name="January";;
02) prev_month_name="February";;
03) prev_month_name="March";;
04) prev_month_name="April";;
05) prev_month_name="May";;
06) prev_month_name="June";;
07) prev_month_name="July";;
08) prev_month_name="August";;
09) prev_month_name="September";;