diff --git a/mysqlbu-scripts.sh b/mysqlbu-scripts.sh index 7ac8d7b..b1678f7 100755 --- a/mysqlbu-scripts.sh +++ b/mysqlbu-scripts.sh @@ -52,6 +52,7 @@ DELETE_BACKUP() { done bsz=`du -sh ${tbus[$1]} | awk '{print $1}'` + sbu1=$tbus[$1] IFS=/ sbu1a=(${tbus[$1]}) unset IFS @@ -63,7 +64,7 @@ DELETE_BACKUP() { fi echo "" - if [ ${#1} = 1 ] || [ ${sbu1a[5]//-/:: -5} = "_BASE" ]; then + if [ ${#1} = 1 ] || [ ${sbu1: -5} = "_BASE" ]; then echo -e "${idsCL[Red]}(This is a daily base backup, and will result in the full day being DELETED.)"${idsCL[Default]} delbu="/${sbu1a[1]}/${sbu1a[2]}${sbu1a[3]}/${sbu1a[4]}" else