diff options
author | Erich Eckner <git@eckner.net> | 2019-07-10 21:08:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-07-10 21:08:57 +0200 |
commit | dc2a57bad09aa84af42ec119eaf22c20bee85e35 (patch) | |
tree | 0cde1aafd99a53b2ea36c478561a2a8d3166dd3f | |
parent | 829dbea51fe6caa9be9e25190c26a266174b4f13 (diff) | |
download | copyPhotos-dc2a57bad09aa84af42ec119eaf22c20bee85e35.tar.xz |
copyPhotos: do not exit on non-matching regex
-rwxr-xr-x | copyPhotos | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -215,10 +215,10 @@ do bild="$( echo "${!daten[@]}" | \ tr ' ' '\n' | \ - grep "${re}.*\.[jJ][pP][gG]\$" + grep "${re}.*\.[jJ][pP][gG]\$" || true )" fi - if [ "$(echo "${bild}" | wc -l | cut -d' ' -f1)" -ne 1 ] + if [ "$(echo "${bild}" | wc -l | cut -d' ' -f1)" -ne 1 ] || [ -z "${bild}" ] then echo 'Nicht genau ein Treffer, sondern '"$(echo "${bild}" | wc -l | cut -d' ' -f1)"':' echo "${bild}" | \ |