mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
double quote find expression too
This commit is contained in:
parent
da419c79b1
commit
fc86bcc4cd
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ done
|
|||
|
||||
if [ -n "$MAX_BACKUPS" ]
|
||||
then
|
||||
while [ $(find /backup -maxdepth 1 -name "*.sql.gz" | wc -l) -gt "$MAX_BACKUPS" ];
|
||||
while [ "$(find /backup -maxdepth 1 -name "*.sql.gz" | wc -l)" -gt "$MAX_BACKUPS" ];
|
||||
do
|
||||
TARGET=$(find /backup -maxdepth 1 -name "*.sql.gz" | sort | head -n 1)
|
||||
echo "Backup $TARGET is deleted"
|
||||
|
|
Loading…
Reference in a new issue