Commit ec3d6b90 authored by Holger Levsen's avatar Holger Levsen

ignore vanishing files

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent a2c5e000
......@@ -84,7 +84,7 @@ if [ -s $FILE ] ; then
for log in $(sort -u $FILE)
do
echo "$log" | cut -d "/" -f5-
grep -E "$PATTERN" "$log" | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
grep -E "$PATTERN" "$log" 2>/dev/null | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
rm -f "$log"
done
echo
......
......@@ -112,7 +112,7 @@ if [ -s $FILE ] ; then
do
echo "$log" | cut -d "/" -f5-
test -s "$log" || echo "${tab}Empty logfile."
grep -E "$PATTERN" "$log" | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
grep -E "$PATTERN" "$log" 2>/dev/null | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
rm -f "$log"
done
echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment