ddn-ime-evaluation/benchmark/tool_show_bad_output_files.sh

18 lines
315 B
Bash
Raw Normal View History

2018-10-23 08:53:39 +00:00
#!/bin/bash
force_delete=$1
find "./output" -type f -name "*.txt" -print0 |
while IFS= read -r -d $'\0' fn; do
status="$(grep -i "error" $fn)"
if [[ "" != ${status} ]]; then
if [[ "delete" == $force_delete ]]; then
set -x
2018-10-24 09:12:22 +00:00
git rm $fn
2018-10-23 08:53:39 +00:00
set +x
else
echo "Bad output: $fn"
fi
fi
done