From 28520c390e309c8d6b77b83219aa41778d65de32 Mon Sep 17 00:00:00 2001 From: sts23 <53382325+sts23@users.noreply.github.com> Date: Sun, 7 Mar 2021 14:28:02 +0100 Subject: [PATCH] Fix Anzahl Snaps 1 bei leeren Ergebnis (ANZSNAPS) --- snpgrpdl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snpgrpdl.sh b/snpgrpdl.sh index 6e1724a..7011461 100644 --- a/snpgrpdl.sh +++ b/snpgrpdl.sh @@ -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" ]