Could you please try following and let me know if this helps you.
Code above will show output of both columns differently but one shouldn't expect like each time output will be different from previous run of command, hope it helps. If you have any queries or you have further requirement request you to please provide in details statement.
Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
How to generate a random integer with specific range(for example, from 1 to 1000)?
Also, how to convert a floating point number into a integer? (2 Replies)
I want to be able to generate a random number within a korn shell script..
Preferably i would like to be able to state how many digits should be in this random number... ie 4 digits or 5 digits etc
Any ideas? (2 Replies)
Hello All...
Can someone help me generate a random password which will be 7 characters long which contains alpha-numeric characters using shell script.
I am looking to store the output of the script that generates the password to a variable within a script and use it as the password.
... (5 Replies)
I need a function to generate a random alphanumeric password in C code. It needs to be between 6-8 characters and follow the following rules:
Reject if same char appears # time: 4 or more
Reject if same char appears consecutively: 3 or more
I have the following random password working for... (2 Replies)
I saw this formula to generate random number between two specified values in shell script.the following.
$(((RANDOM%(max-min+divisibleBy))/divisibleBy*divisibleBy+min))
Give a example in book.
Generate random number between 6 and 30.like this.
$(((RANDOM%30/3+1)*3))
But I have a... (1 Reply)
Hi All,
I have extracted some report from database for few activities done.
Now I have a requirement to add some random time(In range of 10-35) in front of each activity.
Can be generated random numbers in any bash/sh shell within a given number range, let's say in between 10-30.
... (10 Replies)
Dear all,
I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000)
thanks a lot!
Lin (2 Replies)
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Hi all...
Apologies for any typos, etc...
This took a while but it didn't beat me...
Although there are many methods of generating random numbers in a POSIX shell this uses integer maths and a simple C source to create an executable to get epoch to microseconds accuracy if it is needed. I take... (8 Replies)
Discussion started by: wisecracker
8 Replies
LEARN ABOUT DEBIAN
test::regression
Test::Regression(3pm) User Contributed Perl Documentation Test::Regression(3pm)NAME
Test::Regression - Test library that can be run in two modes; one to generate outputs and a second to compare against them
VERSION
Version 0.05
SYNOPSIS
use Test::Regression;
ok_regression(sub {return "hello world"}, "t/out/hello_world.txt");
DESCRIPTION
Using the various Test:: modules you can compare the output of a function against what you expect. However if the output is complex and
changes from version to version, maintenance of the expected output could be costly. This module allows one to use the test code to
generate the expected output, so that if the differences with model output are expected, one can easily refresh the model output.
EXPORT
ok_regression
FUNCTIONS
ok_regression
This function requires two arguments: a CODE ref and a file path. The CODE ref is expected to return a SCALAR string which can be compared
against previous runs. If the TEST_REGRESSION_GEN is set to a true value, then the CODE ref is run and the output written to the file.
Otherwise the output of the file is compared against the contents of the file. There is a third optional argument which is the test name.
ENVIRONMENT VARIABLES
TEST_REGRESSION_GEN
If the TEST_REGRESSION_GEN environment file is unset or false in a perl sense, then the named output files must exist and be readable and
the test will run normally comparing the outputs of the CODE refs against the contents of those files. If the environment variable is true
in a perl sense, then model output files will be overwritten with the output of the CODE ref.
AUTHOR
Nicholas Bamber, "<nicholas at periapt.co.uk>"
BUGS
Please report any bugs or feature requests to "bug-test-regression at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Regression>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
testing of STDERR
The testing of stderr from this module is not as thorough as I would like. Test::Builder::Tester allows turning off of stderr checking but
not matching by regular expression. Handcrafted efforts currently fall foul of Test::Harness. Still it is I believe adequately tested in
terms of coverage.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::Regression
You can also look for information at:
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Regression>
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Test-Regression>
o CPAN Ratings
<http://cpanratings.perl.org/d/Test-Regression>
o Search CPAN
<http://search.cpan.org/dist/Test-Regression/>
ACKNOWLEDGEMENTS
Some documentation improvements have been suggested by toolic (http://perlmonks.org/?node_id=622051).
Thanks to Filip GraliXski for pointing out I need to test against output of zero length and providing a patch.
COPYRIGHT & LICENSE
Copyright 2009-10 Nicholas Bamber.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as
published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
perl v5.10.1 2010-08-29 Test::Regression(3pm)