Can anyone tell me what could be the solution to following :
I have one .txt file which contains some "seed" information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed.
Please provide the script code... (4 Replies)
Hi,
Using the egrep ,i can exclude header and trailer records in file.I want to do in perl.Please help
egrep -iv 'head|trail' filename
Thanks in advance
MR (6 Replies)
Dear All,
I have multiple files having number of records, consist of more than 10 columns some column values are duplicate and i want to remove these duplicate values from these files.
Duplicate values may come in different files.... all files laying in single directory..
Need help to... (3 Replies)
Hi
I have stored a command output in an array like below
@a = `xyz`;
actually xyz comnad will give the output like this
tracker
date
xxxxxxx
xxxxxxx
---------------------
1 a
2 b
----------------------
i have stored the "xyz" output to an... (3 Replies)
Greetings All,
I would like to find all occurences of a pattern and delete a substring from the all matching lines EXCEPT the first. For example:
1234::group:user1,user2,user3,blah1,blah2,blah3
2222::othergroup:user9,user8
4444::othergroup2:user3,blah,blah,user1
1234::group3:user5,user1
... (11 Replies)
Hi,
I have a huge file which has Lacs of lines. File system got full.
I want your guys help to suggest me a solution so that I can remove all lines from that file but not last 50,000 lines. I want solution which can remove lines from existing file so that I can have some space left with. (28 Replies)
Hello everyone,
Although it seems easy, I've been stuck with this problem for a moment now and I can't figure out a way to get it done.
My problem is the following:
I have a file where each line is a sequence of IP addresses, example :
10.0.0.1 10.0.0.2
10.0.0.5 10.0.0.1 10.0.0.2... (5 Replies)
Discussion started by: MisterJellyBean
5 Replies
LEARN ABOUT PHP
mt_srand
MT_SRAND(3) 1 MT_SRAND(3)mt_srand - Seed the better random number generatorSYNOPSIS
void mt_srand ([int $seed])
DESCRIPTION
Seeds the random number generator with $seed or with a random value if no $seed is given.
Note
There is no need to seed the random number generator with srand(3) or mt_srand(3) as this is done automatically.
PARAMETERS
o $seed
- An optional seed value
RETURN VALUES
No value is returned.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.2.1 | |
| | |
| | The Mersenne Twister implementation in PHP now |
| | uses a new seeding algorithm by Richard Wagner. |
| | Identical seeds no longer produce the same |
| | sequence of values they did in previous versions. |
| | This behavior is not expected to change again, |
| | but it is considered unsafe to rely upon it none- |
| | theless. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
mt_srand(3) example
<?php
// seed with microseconds
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
mt_srand(make_seed());
$randval = mt_rand();
?>
SEE ALSO mt_rand(3), mt_getrandmax(3), srand(3).
PHP Documentation Group MT_SRAND(3)