06-24-2013
That's not a robust solution. What if there's a username or group named May or containing such a substring? It could trigger false positives. What if May occurs in the wildcard portion of abc*.txt? Another possible false positive. The format of the date in ls depends on locale. It may use 05 instead of May.
Then again, perhaps your suggestion is good enough for the OP's needs.
Regards,
Alister
This User Gave Thanks to alister For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Howdy,
I'm trying to figure out how to move multiple files based on their creation date. If anyone can enlighten me it would be most appreciated!!
Thanks!
:D (1 Reply)
Discussion started by: dgoyea
1 Replies
2. Shell Programming and Scripting
HI
I want to create a date folder and then a log file under it, which will hold all output of shell script. Say shell script abc.sh runs every day and I want to redirect the output of abc.sh > /opt/bea/wls81/Pkmtest/$(date +%Y%m%d)/ant.log.
Here date should always change according to system... (2 Replies)
Discussion started by: pankajkrmishra
2 Replies
3. Shell Programming and Scripting
Hi,
I need command to display files with full path and date of files where are generated at every 5hrs in a folder.
eg:
/u01/app/test/orjthsd_1_1 Sun May 10 19:03:26 2009
/u01/app/test/weoiusd_1_1 Sun May 10 21:00:26 2009
thanks
saha (3 Replies)
Discussion started by: saha
3 Replies
4. Shell Programming and Scripting
Arg, I'm trying to figure out how to create a album tag based on the last modified date stamp for files which don't have a corresponding .talk file.
IE. 2009 12 10 - Talk Radio.mp3 is how I want them structured, they should all have a corresponding .talk file so my mp3 player can speak the name ie... (0 Replies)
Discussion started by: mrplow
0 Replies
5. Shell Programming and Scripting
hi all,
here is the description to my problem.
input parameters: $date1 & $date2
based on the range i need to select the archived files from the archived directory and moved them in to working directory.
can u please help me in writing the code to select the multiple files based on the... (3 Replies)
Discussion started by: bbc17484
3 Replies
6. Shell Programming and Scripting
Hi All,
Really stuck up with a requirement where I need to move a file (Lets say date_Employee.txt--the date will have different date values like 20120612/20120613 etc) from one directory to another based on creation/modification dates.
While visiting couple of posts, i could see we can... (3 Replies)
Discussion started by: dsfreddie
3 Replies
7. UNIX for Dummies Questions & Answers
Hi
I am unable to find files, those are present anywhere in the same directory tree, based on the creation date. I need to find the files with their path, as I need to create them in another location and move them. I need some help with a script that may do the job.
Please help (2 Replies)
Discussion started by: sam192837465
2 Replies
8. Shell Programming and Scripting
I'm wanting to write a bourne shell script that takes in two command line arguments - a directory and a file. With this I want to return a list of files within the directory that are older (based on creation date) than the given file, and print the number of files that have not been listed (they... (4 Replies)
Discussion started by: britty4
4 Replies
9. Shell Programming and Scripting
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)
Discussion started by: humble_learner
3 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)