From 4c6e1878bb65652cfce26cfbffdcfdbc539ff632 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 16 May 2022 17:35:23 +0200 Subject: Null Bilder korrekt erkennen und anzeigen --- copyPhotos | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyPhotos b/copyPhotos index 988da77..ad3b033 100755 --- a/copyPhotos +++ b/copyPhotos @@ -231,9 +231,9 @@ do grep "${re}.*\.[jJ][pP][gG]\$" || true )" fi - if [ "$(echo "${bild}" | wc -l | cut -d' ' -f1)" -ne 1 ] || [ -z "${bild}" ] + if [ "$(printf '%s' "${bild}" | wc -l)" -ne 1 ] then - echo 'Nicht genau ein Treffer, sondern '"$(echo "${bild}" | wc -l | cut -d' ' -f1)"':' + echo 'Nicht genau ein Treffer, sondern '"$(printf '%s' "${bild}" | wc -l)"':' echo "${bild}" | \ sed 's|^| |' read s -- cgit v1.2.3-70-g09d2