ddn-ime-evaluation/benchmark/tool_show_bad_output_files.sh

20 lines
412 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
status="$(grep -i "error" $fn)"
if [[ "" != ${status} ]]; then
if [[ "delete" == $force_delete ]]; then
set -x
2018-12-11 21:30:58 +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