Skip to content

Instantly share code, notes, and snippets.

@joyeecheung
Created August 5, 2014 11:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joyeecheung/c46e247bdbedc54c52e7 to your computer and use it in GitHub Desktop.
Save joyeecheung/c46e247bdbedc54c52e7 to your computer and use it in GitHub Desktop.
count.sh
#! /usr/bin/env bash
for i in {1..20}; do
ant run
result=`grep "No solution" ASearchDialog.txt`
if [ ! -z "$result" ]; then
echo "-1" >> result.txt
else
result=`grep -o "Total number of searched nodes:[0-9]\+" ASearchDialog.txt | grep -o '[0-9]\+$'`
echo $result >> result.txt
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment