Update mm-scripts.sh

This commit is contained in:
2023-07-10 20:51:19 -05:00
parent 021dd2056d
commit a622c2b813

View File

@@ -1186,7 +1186,14 @@ SERVICERESTORE(){
fname=${bakfile##*/}
fdate=${fname#*.}; fdate=${fdate%.*}
IFS='-'; read -a f_date <<< "${fdate}"; unset IFS
if [ ${f_date[3]} -gt 12 ]; then hr=`expr ${f_date[3]} - 12`; ma=pm; else hr=${f_date[3]}; ma=am; fi [ ${hr} -lt 10 ] && hr=" ${hr}"
if [ ${f_date[3]} -gt 12 ]
then
hr=`expr ${f_date[3]} - 12`
ma=pm
else
hr=${f_date[3]}
ma=am
fi [ ${hr} -lt 10 ] && hr=" ${hr}"
fdate="${f_date[1]}/${f_date[2]}/${f_date[0]} @ ${hr}:${f_date[4]}${ma}"
echo -e "[${f}] ${fdate} - ${fname}"