useless cat fix

master
Peter Babič 9 years ago
parent 7f300e3c0e
commit 00cb4b6283
  1. 6
      robocode-svm

@ -37,8 +37,8 @@ show_help() {
# Run the battle wit the specified parameters # Run the battle wit the specified parameters
# @param gui --gui|--no-gui # @param gui --gui|--no-gui
# @param x the position of the roaming robot on x-axis # @param x the position of the roaming robot on x-axis
# @param y the position of the roaming robot on y-axis # @param y the position of the roaming robot on y-axis
# @param alpha the orientation of the gun of the roaming robot (OPTIONAL) # @param alpha the orientation of the gun of the roaming robot (OPTIONAL)
run_battle() { run_battle() {
# The x and y parameters are required integers # The x and y parameters are required integers
@ -76,7 +76,7 @@ run_battle() {
# Run battle without GUI, following the settings file, save the results into file # Run battle without GUI, following the settings file, save the results into file
robocode "$gui" -battle "$(pwd)/$settings" -results "$(pwd)/$results" > /dev/null robocode "$gui" -battle "$(pwd)/$settings" -results "$(pwd)/$results" > /dev/null
# Obtain the winner from the results file # Obtain the winner from the results file
cat "$results" | tail -2 | awk 'NR==1F {print $2}' tail -2 < "$results" | awk 'NR==1F {print $2}'
} }
# Generate the missing amount of data from running battles # Generate the missing amount of data from running battles

Loading…
Cancel
Save