Hi all,
I am trying to zgrep / grep list of files so that it displays only the matching filename:line number and does not display the whole line, like:
(echo "1.txt";echo "2.txt") | xargs zgrep -no STRING
If I use -o option, it displays the matching STRING and if not used, displays the... (3 Replies)
Hi,
I was just wondering if anyone has, or knows where to download a prime number finder program. I would like a fairly simple bash program, and also I would like one that could take advantage of multiple processors. I have 500 cores I can use, and would like to take advantage of them using a... (2 Replies)
I`m having a output shown below,
CFR 235,BBC DM-2 ALL
CFR 111,BBC DM-2 ALL
CFR 333,BBC DM-2 ALL
from the above Output i want to use 235,111,333 as input for other purpose.
these no always change every time i run script.so please suggest me the way i could do it with example,i have tried... (5 Replies)
Hello,
I have some extra time at work and I'm trying to come up with a good prime number generator for very large numbers that can take advantage of multiple (hundreds) cores. I realize Perl may not be the best solution for this, any ideas?
Thanks! (1 Reply)
Alright, here's the deal. I'm running the following ruby script (output follows):
>> /Users/name/bin/acweather.rb -z 54321 -o /Users/name/bin -c
Clouds AND Sun 57/33 - Mostly sunny and cool
I want to just grab the "57/33" portion, but that's it. I don't want any other portion of the line. I... (5 Replies)
Hey guyz,
I have a table like this:
1 A=#;B=#;C=#
2 A=#;C=#;D=#;E=#;E=#
3 B=#;B=#;B=#;D=#
# are just some numbers. I want to have the output like this:
* 1 2 3
A # # NA
B # NA #
C # # NA
D NA # #
E NA # NA
So basically, I wanna know in each of the rows in my input (which... (9 Replies)
The problem I'm having is that when you put in the two numbers the answer is just prime.... nothing. I cannot figure this out ive been working on this forever, can someone please god just tell me how to fix this without encrypted "hints".
#include <iostream>
#include <cmath>
using... (3 Replies)
Can anybody tell me why the second part of this script (Sieve of Eratosthenes) isn't working properly. This isnt coursework or homework just private studies ( Yes Project Euler began it ) I know there are easier ways of doing this too but I want to do it this way.:p
Iam using Cygwin on Vista... (3 Replies)
Hi, This is my first post.
I have a korn shell script which outputs a select statment to a file. There is only one column and one row which contains a record count of the select statement.
The select statement looks something like this:
SELECT COUNT(some_field) AS "count_value"
... (2 Replies)
I want to check my data quality. I want to output the lines with non-number. I used the grep command:
grep '' myfile.csv
Since my file is csv file, I don't want to output the lines with comma. And I also don't want to output "." or space. But I still get the lines like the following:... (8 Replies)
Discussion started by: twotwo
8 Replies
LEARN ABOUT DEBIAN
numtheory
math::numtheory(3tcl) Tcl Math Library math::numtheory(3tcl)__________________________________________________________________________________________________________________________________________________NAME
math::numtheory - Number Theory
SYNOPSIS
package require Tcl ?8.5?
package require math::numtheory ?1.0?
math::numtheory::isprime N ?option value ...?
_________________________________________________________________DESCRIPTION
This package is for collecting various number-theoretic operations, though at the moment it only provides that of testing whether an inte-
ger is a prime.
math::numtheory::isprime N ?option value ...?
The isprime command tests whether the integer N is a prime, returning a boolean true value for prime N and a boolean false value for
non-prime N. The formal definition of 'prime' used is the conventional, that the number being tested is greater than 1 and only has
trivial divisors.
To be precise, the return value is one of 0 (if N is definitely not a prime), 1 (if N is definitely a prime), and on (if N is proba-
bly prime); the latter two are both boolean true values. The case that an integer may be classified as "probably prime" arises
because the Miller-Rabin algorithm used in the test implementation is basically probabilistic, and may if we are unlucky fail to
detect that a number is in fact composite. Options may be used to select the risk of such "false positives" in the test. 1 is
returned for "small" N (which currently means N < 118670087467), where it is known that no false positives are possible.
The only option currently defined is:
-randommr repetitions
which controls how many times the Miller-Rabin test should be repeated with randomly chosen bases. Each repetition reduces
the probability of a false positive by a factor at least 4. The default for repetitions is 4.
Unknown options are silently ignored.
KEYWORDS
number theory, prime
CATEGORY
Mathematics
COPYRIGHT
Copyright (c) 2010 Lars Hellstrom <Lars dot Hellstrom at residenset dot net>
math 1.0 math::numtheory(3tcl)