From c97d2d2b6d8db093bda061bbc4cd3018cb4b1e24 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 21 Nov 2016 16:08:32 +0100 Subject: impressive-display: Silence some grep calls. --- bin/impressive-display | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/impressive-display b/bin/impressive-display index bc0bac4..0e3bdf7 100755 --- a/bin/impressive-display +++ b/bin/impressive-display @@ -157,7 +157,7 @@ else RESOLUTION="$DEFAULT_RESOLUTION" fi -if ! echo "$PDF_URI" | grep -E "^(file://|http://|https://).*"; then +if ! echo "$PDF_URI" | grep -q -E "^(file://|http://|https://).*"; then $OUTPUT "ERROR: PDF_URI format not supported: $PDF_URI" $OUTPUT " Use file:///.pdf(.gz) or http(s):////.pdf. Doing nothing." exit -1 @@ -341,7 +341,7 @@ function download_pdffile { fi # is the PDF file gzipped? - if echo "$DOWNLOADED_FILE" | grep -E '.*\.gz$'; then + if echo "$DOWNLOADED_FILE" | grep -q -E '.*\.gz$'; then gunzip -f "$DOWNLOADED_FILE" mv "${DOWNLOADED_FILE/.gz/}" "$pdffile_downloaded" else -- cgit v1.2.3