ddn-ime-evaluation/benchmark/tool_show_bad_output_files.sh

23 lines
522 B
Bash
Executable File

#!/bin/bash
force_delete=$1
find "./output_v2" -mindepth 1 -maxdepth 1 -type f -name "*.txt" -print0 |
while IFS= read -r -d $'\0' fn; do
status="$(grep -i error $fn)"
status+="$(grep ime_inode_imcl_buf_flush_try_lru_cb $fn)"
status+="$(tail -1 $fn.json | grep Results)"
if [[ "" != ${status} ]]; then
if [[ "delete" == $force_delete ]]; then
set -x
git rm $fn
git rm -r ${fn}_network
git rm ${fn}.json
set +x
else
echo "Bad output: $fn"
fi
fi
done