From 619e205dcf7dc255d96a84aa1577c51a6bf000c2 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 2 Aug 2014 10:02:27 -0700 Subject: [PATCH] Fix grep fail. Signed-off-by: Robin H. Johnson --- marc_export_custom/sitka-full-export-parallel-outlook-wrapper.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/marc_export_custom/sitka-full-export-parallel-outlook-wrapper.sh b/marc_export_custom/sitka-full-export-parallel-outlook-wrapper.sh index 63b32d9..f26cbb4 100755 --- a/marc_export_custom/sitka-full-export-parallel-outlook-wrapper.sh +++ b/marc_export_custom/sitka-full-export-parallel-outlook-wrapper.sh @@ -22,10 +22,12 @@ mv *split* split/ pbzip2 -9nvk -p4 *{marc,log} pbzip2 -9nv -p4 split/*{marc,log} $DIR/stats.sh -egrep -sq '^([[:space:]]*0){2}' *stats +# Look for zeros in the output marc +egrep -vsq '^([[:space:]]*0){2}.*marc$' *stats grep_result=$? +# halt if found if [ $rc -ne 0 -o $grep_result -ne 0 ]; then - echo "Failed to run export! Human needed! export=$rc grep=$rc" 1>&2 + echo "Failed to run export! Human needed! export=$rc grep_sanity=$grep_result" 1>&2 cat *stats 1>&2 exit 1 fi -- 2.3.6