From: Eduardo Ramos Testillano Date: Mon, 20 Jun 2016 01:37:22 +0000 (+0200) Subject: Avoid empty metada files X-Git-Tag: REFACTORING_TESTING_LIBRARY~5 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=5e6cbe34594884c65483235a5d782fe5717cdce6;p=anna.git Avoid empty metada files --- diff --git a/example/diameter/pcapDecoder/tsharkDecoder.sh b/example/diameter/pcapDecoder/tsharkDecoder.sh index b713b49..3628318 100755 --- a/example/diameter/pcapDecoder/tsharkDecoder.sh +++ b/example/diameter/pcapDecoder/tsharkDecoder.sh @@ -354,5 +354,13 @@ then rm $RESULTS_DIR/.wanted $RESULTS_DIR/.all fi +# Purge frames with invalid metadata: +invalid=( $(grep -lw "^code=$" $RESULTS_DIR/*metadata) ) +for file in ${invalid[@]} +do + frm=$(basename $file | cut -d\. -f1) + rm $RESULTS_DIR/${frm}.* +done + _exit "Done!" 0