From 1c85f8188a84120bd52201d81b2129e78ce13051 Mon Sep 17 00:00:00 2001 From: rey jean-Francois Date: Fri, 2 Aug 2013 11:31:54 +0200 Subject: [PATCH] update Checktools --- main_tools/ThirdPass.sh | 4 ++-- tools/scripts/CheckFirstPass.sh | 6 +++--- tools/scripts/CheckSecondPass.sh | 2 +- tools/scripts/CheckThirdPass.sh | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main_tools/ThirdPass.sh b/main_tools/ThirdPass.sh index 8d724ba..55f39c3 100755 --- a/main_tools/ThirdPass.sh +++ b/main_tools/ThirdPass.sh @@ -217,7 +217,7 @@ do print_warn "[${BASENAME}] Speeral output error : check $LOGFILE" 2 print_log_file $LOGFILE "WARN : Speeral number of output ERROR $LST/$speaker.lst" - ls $RES_DIR/*.seg | grep -e "$speaker" | sed -e "s|$RES_DIR\/||" | sed -e 's/\.seg//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp + ls $RES_DIR/*.seg 2>/dev/null | grep -e "$speaker" | sed -e "s|$RES_DIR\/||" | sed -e 's/\.seg//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp print_log_file $LOGFILE "Segs (and treil) not done :\n[" diff $LST/$speaker.lst ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> $LOGFILE print_log_file $LOGFILE "] [$(date +'%d/%m/%y %H:%M:%S')]" @@ -235,7 +235,7 @@ done ## Check missing seg and log it if [ $CHECK -eq 1 ] then - ls $RES_DIR/*.treil | sed -e "s|$RES_DIR\/||g" | sed -e 's/\.treil//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp + ls $RES_DIR/*.treil 2>/deV/null | sed -e "s|$RES_DIR\/||g" | sed -e 's/\.treil//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp todo=$(cat ${PLP_FILE_P1} | wc -l) if [ $todo -eq 0 ]; then todo=1;fi notdone=$(($todo - $(cat ${OUTPUT_DIR_BASENAME}/.tmp | wc -l))) diff --git a/tools/scripts/CheckFirstPass.sh b/tools/scripts/CheckFirstPass.sh index e11faa5..f49fa63 100755 --- a/tools/scripts/CheckFirstPass.sh +++ b/tools/scripts/CheckFirstPass.sh @@ -39,7 +39,7 @@ function check_first_pass_plps_lbl() if [ ! -e "$1" ] || [ -z "$1" ]; then return 1; fi if [ ! -e "$2" ] || [ -z "$2" ]; then return 1; fi FILENBLBL=$(cat "$2" | wc -l) - FILENBPLP=$(ls "$1" | wc -l) + FILENBPLP=$(ls "$1" 2>/dev/null | wc -l) if [ $FILENBLBL -ne $FILENBPLP ]; then return 1; fi fi return 0 @@ -54,8 +54,8 @@ check_first_pass_output_speeral() if [ $# -eq 2 ] then if [ ! -e "$1" ] || [ -z "$1" ]; then return 1; fi - FILENBSEG=$(ls $2/*.seg | grep -f "$1" | wc -l) - FILENBRES=$(ls $2/*.res | grep -f "$1" | wc -l) + FILENBSEG=$(ls $2/*.seg 2>/dev/null | grep -f "$1" | wc -l) + FILENBRES=$(ls $2/*.res 2>/dev/null | grep -f "$1" | wc -l) #FILENBPHO=$(ls "$2/*.pho" | grep -f "$1" | wc -l) FILENB=$(cat "$1" | wc -l) FILENBPHO=$FILENB diff --git a/tools/scripts/CheckSecondPass.sh b/tools/scripts/CheckSecondPass.sh index cd0e167..1fc3ebe 100644 --- a/tools/scripts/CheckSecondPass.sh +++ b/tools/scripts/CheckSecondPass.sh @@ -22,7 +22,7 @@ function check_second_pass_output_speeral() if [ ! -e "$1" ] || [ -z "$1" ]; then return 1; fi FILENBSEG=$(ls "$2/*.seg" 2> /dev/null | grep -f "$1" | wc -l) FILENBRES=$(ls "$2/*.res" 2> /dev/null | grep -f "$1" | wc -l) - FILENBTREIL=$(ls "$2/*.treil" 2 /dev/null | grep -f "$1" | wc -l) + FILENBTREIL=$(ls "$2/*.treil" 2> /dev/null | grep -f "$1" | wc -l) FILENB=$(cat "$1" | wc -l) if [ $FILENB -ne $FILENBSEG ] || [ $FILENB -ne $FILENBRES ] || [ $FILENB -ne $FILENBTREIL ] ; then return 1;fi fi diff --git a/tools/scripts/CheckThirdPass.sh b/tools/scripts/CheckThirdPass.sh index 8fbea17..9ca83dd 100644 --- a/tools/scripts/CheckThirdPass.sh +++ b/tools/scripts/CheckThirdPass.sh @@ -20,9 +20,9 @@ function check_third_pass_output_speeral() if [ $# -eq 2 ] then if [ ! -e "$1" ] || [ -z "$1" ]; then return 1; fi - FILENBSEG=$(ls "$2/*.seg" | grep -f "$1" | wc -l) - FILENBRES=$(ls "$2/*.res" | grep -f "$1" | wc -l) - FILENBTREIL=$(ls "$2/*.treil" | grep -f "$1" | wc -l) + FILENBSEG=$(ls "$2/*.seg" 2>/dev/null | grep -f "$1" | wc -l) + FILENBRES=$(ls "$2/*.res" 2>/dev/null | grep -f "$1" | wc -l) + FILENBTREIL=$(ls "$2/*.treil" 2>/deV/null | grep -f "$1" | wc -l) FILENB=$(cat "$1" | wc -l) if [ $FILENB -ne $FILENBSEG ] || [ $FILENB -ne $FILENBRES ] || [ $FILENB -ne $FILENBTREIL ] ; then return 1;fi fi -- 1.8.2.3