Read-only forum archive

Singular from the command line

Singular from the command line

mdb · Tue Jun 10, 2014 3:49 pm

I would like to run Singular without entering commands in its shell (at the prompt ">")

eg. Singular -c "quit;" will open Singular and then exit

I would like to use this with multiple statements such as
Singular -c "LIB "solve.lib"; quit;"

Is there a website/doc which explains the syntax and gives examples?

Thanks!

Re: Singular from the command line

vinay · Wed Jun 11, 2014 6:25 am

You can put your code in a simple text file say code.sing and run
Code:
Singular < code.sing
on the command line.

You may suppress the info messages by -q option.

Hope this helps.

VInay

Re: Singular from the command line

malex · Wed Jun 11, 2014 12:57 pm

Try single quotes:
Code:
Singular -c 'LIB "solve.lib"; quit;'
or backslash:
Code:
Singular -c "LIB \"solve.lib\"; quit;"

Re: Singular from the command line

mdb · Wed Jun 11, 2014 3:33 pm

Singular < code.sing

-this worked perfectly. thanks! It's nice because you do not have to add any additional quotes, etc. you simply put line-by-line the commands you would type in while in the Singular shell

thanks again :D