mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2007-10-17, 20:32   #1
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3·7·167 Posts
Default Are these commands correct?

I've been running some curves for the Odd Perfect Number project. Because of the scripts I'm using at the moment, the output behaves in a non-standard fashion. Basically, every curve gets it's own file, and the confirmation of completion of Step 2 gets still another file, again, one per curve. This isn't a horrible problem, as I only had to surf the Internet for about five minutes to figure out what to do. I'll describe what I do, and I'd appreciate input on my method, especially whether or not it does what it's supposed to.

When it comes to counting curves, I only want to count completed curves. Well, every time a curve is completed, some information is written to a file that's given the extension '.done'. I created a file called howmanycurves, to be run from a bash prompt, and put in the following line:
Code:
wc -l *.done
So, basically, it counts how many lines are written to files ending in done, in the ecm directory, and I assume that's the number of curves. Btw, when the files are written, the lines don't wrap around their input, so each curve is one line.

The second file, and this is the one that I really wonder whether or not it's working, is made to tell me whether or not any factors were found. The extension of the files that would have factors is '.out'. I use the following line in a file called 'isfactor'.:
Code:
grep -i factor *.out
The problem with this line is that it isn't producing any output. I don't know if the reason is that there isn't a factor(or, technically, the word 'factor') or if I messed up my query.
jasong is offline   Reply With Quote
Old 2007-10-17, 20:48   #2
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

25·257 Posts
Default

Make a file called blah.out. Put the word "factor" in it. Run your script. Does it work? (It should.)

Making those little scripts is the hard way to do what you want to do. What you want to do is alias the command.
Xyzzy is offline   Reply With Quote
Old 2007-10-18, 23:40   #3
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3·7·167 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
What you want to do is alias the command.
I'll google it. Thanks
jasong is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
PARI's commands 3.14159 PARI/GP 2631 2018-09-26 15:26
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
correct me. Washuu Math 3 2005-05-25 09:04

All times are UTC. The time now is 06:54.


Sat Jul 17 06:54:02 UTC 2021 up 50 days, 4:41, 1 user, load averages: 2.23, 2.13, 1.78

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