From 23c6fc14dd7ce39ed5f9e741550326e5e85bc3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Tue, 30 Jan 2024 09:45:18 +0100 Subject: [PATCH] Squash excess output --- qsgen2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qsgen2 b/qsgen2 index 76efea9..9239011 100755 --- a/qsgen2 +++ b/qsgen2 @@ -339,15 +339,15 @@ function _pages() { # Look for links, images and videos and convert them if present. if (${debug}) echo "_pages: Checking for #link, #showimg and #ytvideo in page_content" - if [[ $( grep \#link ${page_content} > /dev/null ) ]]; then + if [[ $( echo ${page_content} | grep \#link ) ]]; then echo "If #link is present, run _link: page_content" page_content=$( _link "${page_content}" ) fi - if [[ $( grep \#showimg ${page_content} > /dev/null ) ]]; then + if [[ $( echo ${page_content} | grep \#showimg ) ]]; then echo "If #showimg is present, run _image: page_content" page_content=$( _image "${page_content}" ) fi - if [[ $( grep \#ytvideo ${page_content} > /dev/null ) ]]; then + if [[ $( echo ${page_content} | grep \#ytvideo ) ]]; then echo "If #ytvideo is present, run _youtube: page_content" page_content=$( _youtube "${page_content}" ) fi