From a2b5f940ad17a5b5db76da445acca0c23bbb009c Mon Sep 17 00:00:00 2001 From: Daniel Dolezal <40464775+daniel156161@users.noreply.github.com> Date: Sat, 22 Aug 2020 02:51:49 +0200 Subject: [PATCH] Update backup.sh --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 120b966..b2a11f1 100755 --- a/backup.sh +++ b/backup.sh @@ -64,7 +64,7 @@ if [ ! -z $keepfiles ]; then remove=$(ls -d -1tr $destination/*.xml | tail -n +$keepfiles | head -n1) if [ ! -z $remove ]; then keepfiles=$((keepfiles + 1)) - del=$(ls $destination/*.xml | tail -n -$keepfiles | head -n1) + del=$(ls $destination/*.xml | head -n -$keepfiles) rm -f $del echo "Backup removed at $del" fi