ddn-ime-evaluation/benchmark/tool_show_bad_output_files.sh

25 lines
586 B
Bash
Raw Normal View History

2018-10-23 08:53:39 +00:00
#!/bin/bash
force_delete=$1
2018-12-11 21:30:58 +00:00
find "./output_v2" -mindepth 1 -maxdepth 1 -type f -name "*.txt" -print0 |
2018-10-23 08:53:39 +00:00
while IFS= read -r -d $'\0' fn; do
2018-12-12 18:59:20 +00:00
status="$(grep -i error $fn)"
status+="$(grep ime_inode_imcl_buf_flush_try_lru_cb $fn)"
status+="$(tail -1 $fn.json | grep Results)"
2018-12-14 11:47:48 +00:00
status+="$(grep -l gsfs-T $fn)"
2018-12-12 18:59:20 +00:00
2018-10-23 08:53:39 +00:00
if [[ "" != ${status} ]]; then
if [[ "delete" == $force_delete ]]; then
set -x
2018-12-14 11:47:48 +00:00
git rm $fn
git rm -r ${fn}_network
git rm ${fn}.json
2018-10-23 08:53:39 +00:00
set +x
else
echo "Bad output: $fn"
fi
fi
done