Since the date data in the file is in the correct order (most significant data comes first in the string) and the fields (year, month, day, hour, minute, and second) are all fixed length fields, the gsub()calls can be avoided if the system date is formatted the same way the dates are formatted in the file:
or, if the GNU time extensions are in your version of awk,
I have a file with colon separated values.. the sample is attached below.
No of fields in each record/line is dependent on the value of field53.
What I need to do is to design a special filter based on specific requirement of some match of values in particular column or combination of columns.
... (2 Replies)
I am sorry to repost this question. it was not clear, and I had the meeting and didn't response the question on time. I do really need help and appreciate your help very much.
I'm looking for a simple shell script that will read lots of audit log file (*.aud) in a log fold every 10 minutes,... (1 Reply)
I'm looking for a command or simple script that will read lots of audit log file (*.aud) in log fold every 10 minutes, and will output to one file based on sysdate - 10 minutes. assume the script is run at 11:12:20, and it
should grep the line from Wed Jun 17 11:02:43 2009 to end of file. after... (4 Replies)
hi all,
here is my question.
i have the following data
Block 1
a b c
d e f
g h i
Block 2
j k l
m n o
p q r
i need to grep all information from block 1 i.e 'a to i' (6 Replies)
Hi,
I have a requirement to display/write the 3rd column from a file based on the value in the column 3.
Ex: Data in the File (comma delimited)
ID,Value,Description
1,A,Active
1,I,Inactive
2,S,Started
1,N,None
2,C,Completed
2,F,Failed
I need to first get a list of all Unique IDs in... (7 Replies)
Hello,
I want to filter records of a file if they fall in range associated with a second file. First the chr number (2nd col of 1st file and 1st col of 2nd file) needs to be matched. Then if the 3rd col of the first file falls within any of the ranges specified by the 2nd and 3rd cols , then... (4 Replies)
Hello,
I have a question on how to filter the data on multiple columns. The problem is I have one table with 25 columns, 4500 rows. I need to filter out the data based on some codes like 'XXXX', I have 25 codes to check on that table. My requirement is that which ever row has this code I... (1 Reply)
Hello
I have a tab text file with many columns and have to filter rows ONLY if column 22 has the value of '0', '1', '2' or '3' (out of 0-5).
If Column 22 has value '0','1', '2' or '3' (highlighted below), then remove anything less than 10 and greater 100 (based on column 5) AND remove anything... (1 Reply)
Discussion started by: nans
1 Replies
LEARN ABOUT DEBIAN
http::proxy::bodyfilter::lines
HTTP::Proxy::BodyFilter::lines(3pm) User Contributed Perl Documentation HTTP::Proxy::BodyFilter::lines(3pm)NAME
HTTP::Proxy::BodyFilter::lines - A filter that outputs only complete lines
SYNOPSIS
use HTTP::Proxy::BodyFilter::lines;
use MyFilter; # this filter only works on complete lines
my $filter = MyFilter->new();
# stack both filters so that they'll handle text/* responses
$proxy->push_filter(
mime => 'text/*',
response => HTTP::Proxy::BodyFilter::lines->new,
response => $filter
);
# I want my lines to end with '!'
# This is equivalent to $/ = '!' in a normal Perl program
my $lines = HTTP::Proxy::BodyFilter::lines->new('!');
DESCRIPTION
The HTTP::Proxy::BodyFilter::lines filter makes sure that the next filter in the filter chain will only receive complete lines. The
"chunks" of data received by the following filters with either end with "
" or will be the last piece of data for the current HTTP message
body.
You can change the idea the filter has of what is a line by passing to its constructor the string it should understand as line ending. "
"
is the default value.
my $filter = HTTP::Proxy::BodyFilter::lines->new( $sep );
This is similar to modifying $/ in a Perl program. In fact, this filter has a behaviour so similar to modifying $/ that it also knows about
"paragraph mode" and "record mode".
Note that the "slurp" mode is not supported. Please use HTTP::Proxy::BodyFilter::complete to enable the generic store and forward filter
mechanism.
METHODS
This filter defines the following methods, which are automatically called:
init()
Initialise the filter with the EOL information.
filter()
Keeps unfinished lines for later.
will_modify()
This method returns a false value, thus indicating to the system that it will not modify data passing through.
SEE ALSO
HTTP::Proxy, HTTP::Proxy::BodyFilter.
AUTHOR
Philippe "BooK" Bruhat, <book@cpan.org>.
COPYRIGHT
Copyright 2003-2006, Philippe Bruhat.
LICENSE
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
perl v5.12.4 2011-07-03 HTTP::Proxy::BodyFilter::lines(3pm)