Back to Forum | View unanswered posts | View active topics
Topic review - Write to file |
Author |
Message |
|
|
Post subject: |
Re: Write to file |
|
|
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?
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
[quote="E-mail to Singular-Team"]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?[/quote]
|
|
|
|
Posted: Thu Dec 01, 2005 3:45 pm |
|
|
|
|
|
Post subject: |
|
|
|
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.htmChristoph Lossen (Singular Team)
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[/code]
creates a file prot.txt with the content
[code]I[1]=x4 I[2]=y8+3556x2[/code]
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[/code]
creates a file prot2.txt with the content
[code]ring r=0,(x,y),dp; ideal I=x4, y8+3556x2; I;[/code]
The writing to a file is terminated when [code]monitor("");[/code] is entered.
See also: [url]http://www.singular.uni-kl.de/Manual/3-0-0/sing_238.htm[/url]
Christoph Lossen (Singular Team)
|
|
|
|
Posted: Thu Sep 22, 2005 5:21 pm |
|
|
|
|
|
Post subject: |
Write to file |
|
|
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?
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?
|
|
|
|
Posted: Thu Sep 22, 2005 5:07 pm |
|
|
|
|
|
It is currently Fri May 13, 2022 11:00 am
|
|