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

21 lines
476 B
Bash
Executable File

#!/usr/bin/env bash
FILE="$1/war.log"
while IFS='' read -r line || [[ -n "$line" ]]; do
case "$line" in
*"Budget"* | *"Mission"* | *"Abschuss"* | *"Respawn"* | *"Punkte"* | *"Flagge"* | *"Revive"* | *"Transport"*)
echo $line;
echo ""
;;
esac
done < ${FILE}
# Add OPT Scoreboard
while IFS= read -r line; do
if [[ $line =~ [^[:space:]] ]]; then
echo "$line"
echo ""
fi
done < <(grep -A 100 Scoreboard ${FILE} )