From: Alexander Barton Date: Fri, 8 Jul 2016 08:03:05 +0000 (+0200) Subject: backup-audit: Suppress error message when no older generation exists X-Git-Url: https://arthur.ath.cx/gitweb/?a=commitdiff_plain;h=c528ee41cb060269fac8e689cbaf402129a87e6b;p=backup-script.git backup-audit: Suppress error message when no older generation exists --- diff --git a/bin/backup-audit b/bin/backup-audit index 2a3b997..0cf89e4 100755 --- a/bin/backup-audit +++ b/bin/backup-audit @@ -119,7 +119,7 @@ HandleSystem() { # Search previous generation without errors local previous_d="" - for d in $(ls -1dt $target/[0-9]*-[0-9]*); do + for d in $(ls -1dt $target/[0-9]*-[0-9]* 2>/dev/null); do [[ -d "$d" && -r "$d/.stamp" ]] || return 0 declare -i code=-1