]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
Add scripts buildcnf
authorKarel Kočí <cynerd@email.cz>
Fri, 18 Sep 2015 07:31:18 +0000 (09:31 +0200)
committerKarel Kočí <cynerd@email.cz>
Fri, 18 Sep 2015 07:34:17 +0000 (09:34 +0200)
This script is for debugging purposes only. It should be launched only
in jobfiles folder and it's generating file cnf.

scripts/buildcnf [new file with mode: 0755]

diff --git a/scripts/buildcnf b/scripts/buildcnf
new file mode 100755 (executable)
index 0000000..fdcf217
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+# This is simple scripts created for generating input file for PicoSAT in jobfiles folder.
+# Tis script is generating file cnf from files fixed and rules and add format head.
+# This script is for debugging purposes.
+
+sed 's/$/ 0/' fixed > cnf
+sed 's/$/0/' rules >> cnf
+
+LINE=`wc -l cnf | awk '{print $1}'`
+VARS=`head -1 variable_count`
+
+sed  -i "1ip cnf $VARS $LINE" cnf