![]() |
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[/code] 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[/code] 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. |
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. |
[QUOTE=Xyzzy;116555]What you want to do is alias the command.[/QUOTE]
I'll google it. Thanks |
| All times are UTC. The time now is 12:28. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.