BEGIN { r="runs.sh"; t="tests.sh";
    for (aamap=6;aamap<19;aamap++){
	r1=sprintf("runs%d.sh",aamap);
	for (lh=12;lh<31;lh+=2) {
	    a=sprintf("win17-1rf%dlrelu-13rf20lrelu-5rf%dlrelu-1rf3sig",aamap,lh);
	    print "mkdir "a
	    print "cd "a
	    print "~/snns/SNNSoS-0.1/SNNSv4.3/tools/sources/td_bignet -p 20 17 -p "aamap" 17  -p 20 5 -p "lh" 1 -p 3 1 -l 1 1 20 1  2 1 "aamap"  -l 2 1 "aamap" 13  3 1 20  -l 3 1 20 5  4 1 "lh"  -l 4 1 "lh" 1  5 1 3"
	    print "awk -f ~/snns/ss/relu/td/change-activation-function1.awk SNNS_TD_NET.net > foo; mv foo SNNS_TD_NET.net"
	    print "cp ~/snns/ss/relu/td/batchman-td.txt ."
	    print "cd .."

	    print "cd "a >>t;
	    print "echo "a >>t;
	    print "grep -B4 best r.log | tail -5 | head -4  | awk -f ~/snns/ss/relu/td/analyze2csv.awk">>t
	    print "cd ..">>t
	    
	    print "cd "a >>r1
	    print "/home/reczko/snns/SNNSoS-0.1/SNNSv4.3/tools/sources/batchman < batchman-td.txt &> r.log &" >> r1;
	    print "cd ..">>r1
	}
	print "wait">>r1;
	print "chmod u+x "r1;
	print "./"r1" &> runs.log ; date">>r
    }
    exit(0);
}{}
