More newbie questions... polymake commands in files
Posted: 09 Jul 2012, 06:13
Sorry to bombard the list with trivial questions, but once again I have tried to find the answer in the documentation but failed...
I have many polytopes to analyse so I've created a file containing all the necessary polymake commands, thousands of lines of them.
I just want to execute those commands.
If I am using a package like GAP or Magma or Mathematica and I have a long list of GAP or Magma or Mathematica commands (generated by another program) then I can run them simply by typing (on the command line)
So I tried "polymake < inputfile" and got "can't start the interactive shell without terminal input".
OK, can I run polymake in "non-interactive" mode? I searched for "interactive" and discovered scripts ...
But I tried loading them by adding "--script" to the command line, or typing script(inputfile) into the interactive shell. Either nothing happens or I get "ERROR: Bareword found where operator expected at input line 1". Even when I deleted everything except a plain Perl statement (print "Success\n";) from the file, I still couldn't read it in.
Is there a way to read in and execute a sequence of commands?
I have many polytopes to analyse so I've created a file containing all the necessary polymake commands, thousands of lines of them.
Code: Select all
$ineq = zero_vector(10) | unit_matrix(10);
$m0 = new Matrix([[-1,1,1,1,0,1,0,0,1,0,0],
[-1,1,1,1,0,0,1,0,0,0,1],
[-1,1,1,1,0,0,0,1,0,1,0],
....
....
print $p0->VERTICES;
....
....
If I am using a package like GAP or Magma or Mathematica and I have a long list of GAP or Magma or Mathematica commands (generated by another program) then I can run them simply by typing (on the command line)
Code: Select all
gap < inputfile
magma < inputfile
math < inputfile
OK, can I run polymake in "non-interactive" mode? I searched for "interactive" and discovered scripts ...
But I tried loading them by adding "--script" to the command line, or typing script(inputfile) into the interactive shell. Either nothing happens or I get "ERROR: Bareword found where operator expected at input line 1". Even when I deleted everything except a plain Perl statement (print "Success\n";) from the file, I still couldn't read it in.
Is there a way to read in and execute a sequence of commands?