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

21 lines
447 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-07-12 11:06:43 +02:00
*"Budget"* | *"Mission"* | *"Abschuss"* | *"Respawn"* | *"Punkte"* | *"Flagge"*)
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} )