Fix Anzahl Snaps 1 bei leeren Ergebnis (ANZSNAPS)

This commit is contained in:
sts23 2021-03-07 14:28:02 +01:00 committed by GitHub
parent 1e26b8a7b4
commit 28520c390e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ do
else
SNAPS=$(zfs list -r -t snap -H -o name -s creation | grep "${DATASET}@" | grep $MUSTER)
fi
ANZSNAPS=$(echo "$SNAPS"|wc -l|sed 's, ,,g')
ANZSNAPS=$(echo "$SNAPS"|grep -v "^$"|wc -l|sed 's, ,,g')
echo "# Anzahl Snaps: $ANZSNAPS"
if [ "$KFLAG" = "1" ]