Merge pull request #4 from sts23/patch-2

Fix Anzahl Snaps 1 bei leeren Ergebnis (ANZSNAPS)
This commit is contained in:
cpzengel 2021-03-12 12:32:42 +01:00 committed by GitHub
commit 45da8286c2
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" ]