diff --git a/lib/base.sh b/lib/base.sh index bd9f5e6..bb245f3 100644 --- a/lib/base.sh +++ b/lib/base.sh @@ -62,17 +62,17 @@ aud_only() { loge "$lst" return $err } + [ -z "$lst" ] && { + log Nothing to remove. + return 0 + } # xargs handles white spaces. - cnt="$(printf %s "$lst" | wc -l | xargs)" || { + cnt="$(printf %s\\n "$lst" | wc -l | xargs)" || { err=$? loge Something went wrong. return $err } - [ "$cnt" = 0 ] && { - log Nothing to remove. - return 0 - } base_should_continue "Remove the following files: $lst Total $cnt files" || return 0