Hi experts,
You cool guys already given me the awk script below-
awk '/9366109380/,printed==5 { ++printed; print; }' 2008-09-14.0.log
Morever, i have one more things-
when i awk 9366109380, i can also see the Upper 3 lines as well as below 5 lines of that string.
Line 1.... (3 Replies)
Hi,
Please provide shell script to Remove empty lines(space) between two lines containing strings in a file.
Input File :
A1/EXT "BAP_BSC6/07B/00" 844 090602 1605
RXOCF-465 PDTR11 1
SITE ON BATTERY
A2/EXT... (3 Replies)
Hi ,
Please help me with the following problem:
I have an xml file with the following lines
<cisco:name>
<cisco:mdNm>Cisco Device 7500 A Series</cisco:mdNm>
<cisco:meNm>10.1.100.19</cisco:meNm>
<cisco:ehNm>/shelf=1</cisco:ehNm>
<cisco:subname>
<cisco:sptp>Cisco PortA... (8 Replies)
I have a huge file and want to separate it into several subsets.
The file looks like:
C1 C2 C3 C4 ... (variable names)
1 ....
2 ....
3 ....
:
22 ....
23 ....
I want to separate the huge file using the column 1, which has numbers from 1 to 23 (but there are different amount of... (8 Replies)
Hey all, a relative bash/script newbie trying solve a problem.
I've got a text file with lots of lines that I've been able to clean up and format with awk/sed/cut, but now I'd like to remove the lines with duplicate usernames based on time stamp. Here's what the data looks like
2007-11-03... (3 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Hello,
I can extract lines in a file, between two strings but only one time.
If there are multiple occurencies, my command show only one block.
Example, monfichier.txt contains :
debut_sect
texte L1
texte L2
texte L3
texte L4
fin_sect
donnees inutiles 1
donnees inutiles 2
... (8 Replies)
Platform : RHEL 5.8
I have text file called myapplication.log . In this file, I have around 800 lines which start with the followng three strings
PWRBRKER-3493
PWRBRKER-7834
SCHEDULER-ERROR
How can I delete these lines in one go ? (13 Replies)
Discussion started by: omega3
13 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)