opt-cc/api/war-parser/clean.sh

21 lines
460 B
Bash
Raw Normal View History

2017-07-08 13:14:59 +02:00
#!/usr/bin/env bash
FILE="$1/war.log"
2017-07-08 13:14:59 +02:00
while IFS='' read -r line || [[ -n "$line" ]]; do
case "$line" in
2017-08-05 23:19:23 +02:00
*"Budget"* | *"Mission"* | *"Abschuss"* | *"Respawn"* | *"Punkte"* | *"Flagge"* | *"Revive"*)
echo $line;
echo ""
;;
esac
done < ${FILE}
2017-07-08 13:14:59 +02:00
# Add OPT Scoreboard
while IFS= read -r line; do
if [[ $line =~ [^[:space:]] ]]; then
echo "$line"
echo ""
fi
2017-07-08 22:50:01 +02:00
done < <(grep -A 100 Scoreboard ${FILE} )