I have a script where I write the score to a file, named log.txt
In this file I save the score like this: (number 1 is just a example)
Won: 1
Lose: 1
I've written this AWK command:
gameswon=`awk -F : '{print $2}' "$file"`
It gives me this result:
1 1
How can I save the first number to, "won" And the second number to "lose"
Hope anyone can help me