diff --git a/mm-scripts.sh b/mm-scripts.sh index 41eb875..2d1a5be 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -1171,8 +1171,7 @@ SERVICERESTORE(){ fulldate=$(date -r ${BACKUPDIR}/${fcheck}-full.tgz "+%y-%m-%d-%H-%M-%S") IFS='-'; read -a full_date <<< "${fulldate}"; unset IFS - [ ${full_date[3]} -gt 12 ] && hr=`expr ${full_date[3]} - 12` && ma=pm || hr=${full_date[3]} && ma=am - [ ${hr} -lt 10 ] && hr=" ${hr}" + if [ ${full_date[3]} -gt 12 ]; then hr=`expr ${full_date[3]} - 12`; ma=pm else hr=${full_date[3]}; ma=am fi [ ${hr} -lt 10 ] && hr=" ${hr}" fulldate="${full_date[1]}/${full_date[2]}/${full_date[0]} @ ${hr}:${full_date[4]}${ma}" echo -e "[1] ${fulldate} - Full Backup ${fname}" @@ -1181,8 +1180,8 @@ SERVICERESTORE(){ fname=${bakfile##*/} fdate=${fname#*.}; fdate=${fdate%.*} IFS='-'; read -a f_date <<< "${fdate}"; unset IFS - [ ${f_date[3]} -gt 12 ] && hr=`expr ${f_date[3]} - 12` && ma=pm || hr=${f_date[3]} && ma=am - [ ${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}"