Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Write to file
Author Message
  Post subject:  Re: Write to file  Reply with quote
One can simply make use of Operating System redirection commands.
e.g. One can use
$ > Singular < myfile.sing > Output.txt
at your command prompt.

If you dont want Singular Headers use -q option.

I am not sure whether this command will work on Windows/Mac? But I guess there should be similar redirection commands.

Regards

Vinay


E-mail to Singular-Team wrote:
Dear Research group of Singular.

I would like to know if there are some special command to write into a file the results of Singular but in the same format as the standard output.
When I simply use the write command, I obtain something like this:

x4,y8+3556x2

but, I would like to have something like this:

_[1]=x4
_[2]=y8+3556x2

Is that possible?
Post Posted: Thu Dec 01, 2005 3:45 pm
  Post subject:   Reply with quote
The solution is provided by the monitor command.

This command writes a copy of the input (or of the output or of both) into a file (with name specified when calling monitor): for instance the Singular session

Code:
> monitor("prot.txt","o");
> ring r=0,(x,y),dp;
> ideal I=x4,  y8+3556x2;
> I;
I[1]=x4
I[2]=y8+3556x2


creates a file prot.txt with the content

Code:
I[1]=x4
I[2]=y8+3556x2


Similarly,

Code:
> monitor("prot2.txt","i");
> ring r=0,(x,y),dp;
> ideal I=x4,  y8+3556x2;
> I;
I[1]=x4
I[2]=y8+3556x2


creates a file prot2.txt with the content

Code:
ring r=0,(x,y),dp;
ideal I=x4,  y8+3556x2;
I;


The writing to a file is terminated when
Code:
monitor("");
is entered.

See also: http://www.singular.uni-kl.de/Manual/3-0-0/sing_238.htm

Christoph Lossen
(Singular Team)
Post Posted: Thu Sep 22, 2005 5:21 pm
  Post subject:  Write to file  Reply with quote
Dear Research group of Singular.

I would like to know if there are some special command to write into a file the results of Singular but in the same format as the standard output.
When I simply use the write command, I obtain something like this:

x4,y8+3556x2

but, I would like to have something like this:

_[1]=x4
_[2]=y8+3556x2

Is that possible?
Post Posted: Thu Sep 22, 2005 5:07 pm


It is currently Fri May 13, 2022 11:00 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group