22 lines
622 B
Bash
Executable file
22 lines
622 B
Bash
Executable file
#!/bin/bash
|
|
# USAGE EXAMPLE: solve_mysteries.scr ops6.txt 2
|
|
# USAGE EXAMPLE: solve_mysteries.scr allops.txt 1800
|
|
opsfile=$1
|
|
maxtime=$2
|
|
f=$3
|
|
|
|
outfile=brute_solutions.dat
|
|
outfile2=brute_constant.dat
|
|
outfile3=brute_formulas.dat
|
|
if [ -f $outfile ]; then /bin/rm $outfile; fi
|
|
if [ -f $outfile2 ]; then /bin/rm $outfile2; fi
|
|
if [ -f $outfile3 ]; then /bin/rm $outfile3; fi
|
|
|
|
echo Trying to solve mysteries with brute force...
|
|
|
|
echo Trying to solve "$f..."
|
|
echo /bin/cp -p "$f" mystery.dat
|
|
/bin/cp -p "$f" mystery.dat
|
|
echo "$opsfile" arity2templates.txt mystery.dat results.dat >args.dat
|
|
timeout $maxtime ./symbolic_regress2.x;
|
|
|