From 29aa4352fd29a4a595722b3986a486bf5a3bea36 Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 13 Dec 2023 12:03:37 +0100 Subject: [PATCH] allow pipe to fail --- uberspace-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uberspace-backup.sh b/uberspace-backup.sh index 653ea85..cef315e 100755 --- a/uberspace-backup.sh +++ b/uberspace-backup.sh @@ -80,7 +80,7 @@ while read -r line; do logecho "${RHOST}: Starting backups" - NORDIR=$(echo "$ALLRDIR" | grep -o "|" | wc -l) + NORDIR=$(echo "$ALLRDIR" | grep -o "|" | wc -l || true) NORDIR=$(($NORDIR + 1)) # Loop through all backup sources