From aa0329d3711da245332d7f266c157051bba49f08 Mon Sep 17 00:00:00 2001 From: Liam Bindle Date: Tue, 8 Mar 2022 12:27:30 -0800 Subject: [PATCH] Ignore no-result grep calls in list operations. --- bin/bashdatacatalog-list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/bashdatacatalog-list b/bin/bashdatacatalog-list index b40c7e3..dffe91c 100755 --- a/bin/bashdatacatalog-list +++ b/bin/bashdatacatalog-list @@ -107,7 +107,7 @@ function trim_scoped_list() { trim_list=$(mktemp) if [ -f .ignore.grep ]; then - grep -v -f .ignore.grep ${working_list} > ${temp_file} + grep -v -f .ignore.grep ${working_list} > ${temp_file} || : cp ${temp_file} ${working_list} fi @@ -134,7 +134,7 @@ function trim_scoped_list() { awk -F ' +' -v threshold=${RANGE_END} "$AWK_CMP_GT" ${temp_file} >> ${trim_list} fi - grep -v -F -f ${trim_list} ${working_list} > ${temp_file} + grep -v -F -f ${trim_list} ${working_list} > ${temp_file} || : cp ${temp_file} ${working_list} fi