Print only the failed log

This commit is contained in:
Khaled Hosny 2018-02-15 11:47:08 +02:00
parent 8e3b4c0e11
commit f8077c9790
1 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,10 @@
#!/bin/bash
for f in $(find . -name '*.log' -not -name 'config.log'); do
echo '====' $f '===='
cat $f
if [[ $(tail -1 $f) = FAIL* ]]; then
echo '====' $f '===='
cat $f
fi
done
# Intentionally exiting with non-zero.