ddn-ime-evaluation/benchmark/tool_show_bad_output_files.sh

26 lines
621 B
Bash
Raw Permalink 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-17 09:54:06 +00:00
status+="$(grep -vo Results $fn.json)"
2018-12-14 11:47:48 +00:00
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-17 09:36:47 +00:00
rm $fn
rm -r ${fn}_network
rm ${fn}.json
2018-10-23 08:53:39 +00:00
set +x
else
echo "Bad output: $fn"
fi
fi
done