#!/bin/bash
[ "$1" == "" ] && exec echo "Usage: $0 FOREVER_DATA_FILE_FROM_XGC"

source $HOME/.gamerc

FILENAME=$1
GAME_TYPE=$(echo $GAME_TYPE|tr [A-Z] [a-z])
COUNTRY_CODE_DISPLAY=$(echo $COUNTRY_CODE_DISPLAY|tr [A-Z] [a-z])
TODAY=$(date +"%Y%m%d")

cat ${FILENAME} | grep -v '請選擇類型' | awk -F" " 'NF==1 {print $1}' > ${GAME_TYPE}${COUNTRY_CODE_DISPLAY}_forever_${TODAY}.csv
