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" ]