mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2018-05-14, 09:40   #1
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,249 Posts
Default Batch file problem

When we got factors from YOYO, I wrote small bat file to automatize project.
All goals I need is done except one: I need that line ( header with sieve depth and base ) be first, but not last ( as I get) when I start bat file
Any idea?
Thanks


Code:
title REMOVE FACTOR
SET /P n= input base number:
sr sr_%n%.abcd -k factors.txt -g
del llr.txt
COPY *.npg all.txt
sort -n -k2 all.txt >>llr.txt
findstr /v "5000000000:P:1:%n%:257" llr.txt > BASE.txt
del llr.txt
del all.txt
echo.25000000000000:P:1:%n%:257 >>BASE.txt
rename BASE.txt BASE%n%.txt

Last fiddled with by pepi37 on 2018-05-14 at 09:41
pepi37 is offline   Reply With Quote
Old 2018-05-14, 23:05   #2
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

2,801 Posts
Default

Try this:

Code:
[...]
findstr /v "5000000000:P:1:%n%:257" llr.txt >BASE.txt
del llr.txt
echo.25000000000000:P:1:%n%:257 >HEAD.txt
copy /B HEAD.TXT+BASE.TXT BASE%n%.txt
del HEAD.txt BASE.txt
kar_bon is offline   Reply With Quote
Old 2018-05-15, 09:02   #3
pepi37
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

1,249 Posts
Default

Quote:
Originally Posted by kar_bon View Post
Try this:

Code:
[...]
findstr /v "5000000000:P:1:%n%:257" llr.txt >BASE.txt
del llr.txt
echo.25000000000000:P:1:%n%:257 >HEAD.txt
copy /B HEAD.TXT+BASE.TXT BASE%n%.txt
del HEAD.txt BASE.txt

THANKS!
Working well now!
pepi37 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch File Issue, Perhaps storm5510 Programming 3 2018-01-18 04:44
PFGW ABC file handling problem carpetpool Information & Answers 19 2016-12-16 01:21
Batch jobs using AWS Batch GP2 Cloud Computing 1 2016-12-07 11:31
Windows batch file for NFS - any help? f1pokerspeed Programming 9 2013-12-24 18:21
batch file em99010pepe No Prime Left Behind 7 2008-03-15 10:53

All times are UTC. The time now is 17:35.

Thu Jun 4 17:35:03 UTC 2020 up 71 days, 15:08, 0 users, load averages: 1.42, 1.94, 1.95

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.