mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2007-04-28, 06:58   #1
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2·17·73 Posts
Default Feature Request: Append to outputfile if it exists

It happens to me from time to time, that when I return to a number for some more ecm curves (or just do some more benchmarking), I just scroll back in my last input lines and than i forget to increase the index of the outputfile by one before I press enter (for example > 1701_44M_a.out, > 1701_44M_b.out, etc.), so it overwrites my old outputfile.

Would it be possible to check if the outputfile already exists, and if yes, append to this file instead of overwriting?
Andi47 is offline   Reply With Quote
Old 2007-04-28, 07:28   #2
bhebden
 
bhebden's Avatar
 
Mar 2003

24 Posts
Default

Using >> doesn't work?

ecm 44000000 < input.txt >> 1701_44M.out
bhebden is offline   Reply With Quote
Old 2007-04-28, 07:31   #3
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

9B216 Posts
Default

Quote:
Originally Posted by bhebden View Post
Using >> doesn't work?

ecm 44000000 < input.txt >> 1701_44M.out
Did not know this. Do I understand right, that >> 1701_44M.out will create a new file if it doesn't exist and append if it exists?
Andi47 is offline   Reply With Quote
Old 2007-04-28, 10:48   #4
S485122
 
S485122's Avatar
 
"Jacob"
Sep 2006
Brussels, Belgium

1,777 Posts
Default

Quote:
Originally Posted by Andi47 View Post
Did not know this. Do I understand right, that >> 1701_44M.out will create a new file if it doesn't exist and append if it exists?
Indeed "> file" creates "file", ">> file" appends to file "file" and if it does not exist create it first. (and it is so since MS-DOS 2,1 if I remember well :-) The same is true for Unix.
S485122 is offline   Reply With Quote
Old 2007-04-29, 14:07   #5
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

246710 Posts
Default

If you use bash, saying "set -C" will make bash refuse to overwrite existing files with output redirection. This command can go into .bashrc, for example.

Edit: oh, wait: are you running ECM under Windows CMD, or in MinGW?

Alex

Last fiddled with by akruppa on 2007-04-29 at 14:08
akruppa is offline   Reply With Quote
Old 2007-04-29, 15:35   #6
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2×17×73 Posts
Default

Quote:
Originally Posted by akruppa View Post
If you use bash, saying "set -C" will make bash refuse to overwrite existing files with output redirection. This command can go into .bashrc, for example.

Edit: oh, wait: are you running ECM under Windows CMD, or in MinGW?

Alex
I am running ECM in MinGW. I have tried - when I use >>outputfile.out it appends to the outputfile if it already exists - exactly what I wanted. (Maybe there should be an according line in the documentation anyway.)
Andi47 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request tcharron Software 3 2018-10-03 20:08
Feature request TheMawn PrimeNet 3 2013-06-17 02:32
Feature request JuanTutors Software 22 2013-03-11 19:23
Feature Request moo Software 24 2005-11-26 22:08
Feature request JuanTutors Software 2 2005-07-04 22:02

All times are UTC. The time now is 09:27.


Fri Jan 28 09:27:26 UTC 2022 up 189 days, 3:56, 2 users, load averages: 1.48, 1.44, 1.28

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔