Hi
I am running a script (which compares two directory contents) for which I am getting an output of 70 pages in which few pages are blank so I was able to delete those blank lines.
But I also want to delete the headers present for each page. can any one help me by providing the code... (1 Reply)
Hi,
I'm trying to strip all lines between two headers in a file:
### BEGIN ###
Text to remove, contains all kinds of characters
...
Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c
om/updates/
Antispyware-Downloadserver.com #2... (3 Replies)
Hello,
I have done much googling on this, but apparently not using the right keywords.
I am assuming there is some kind of header for each file on a disk which stores information such as mod time, access time, etc.
I have two questions:
1) is there a way to read this header directly,... (2 Replies)
Hi ,
I have a .txt file in which I have multiple headers, the header record starts with $ symbol...like the first column name is $Account.
I have to keep the header in the first line and delete all the remaining headers which are in the file.
I tried using sort adc.txt | uniq -u , but my... (7 Replies)
Hey Guys,
Absolute neewbie here. I am trying to see if it is possible to edit headers/meta-data of files in Mac OSX. I am basically trying to change an audio file header to read 16bit instead of 24bit.
We have an issue with some of our software and it regularly exports 16bit audio files with... (3 Replies)
Good evening
Im new at unix shell scripting and im planning to script a shell that removes headers for about 120 files in a directory and each file contains about 200000
lines in average.
i know i will loop files to process each one and ive found in this great forum different solutions... (5 Replies)
Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it? (5 Replies)
Hi Experts,
I want to join two files(file1 ,file2) which are having tab separated values,by sorting them on key column(ID) and want to redirect the output to other file(output file) along with the headers from both the files.
cat file1:
ID Name phone_no
205 mno 90808
200 xyz 32003... (9 Replies)
All,
I guess by this time someone asked this kind of question, but sorry I am unable to find after a deep search.
Here is my request
I have many files out of which 2 sample files provided below.
File-1 (with A,B as column headers)
A,B
1,2
File-2 (with C, D as column headers)
C,D
4,5
I... (7 Replies)
The below awk verifies the count and order of each text file in the directory. The script does execute and produce output, however the order of the headers are not compared to key. The portion in bold is supposed to do that. If the order of the headers in each text file is the same as key, then... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT DEBIAN
http::proxy::headerfilter
HTTP::Proxy::HeaderFilter(3pm) User Contributed Perl Documentation HTTP::Proxy::HeaderFilter(3pm)NAME
HTTP::Proxy::HeaderFilter - A base class for HTTP message header filters
SYNOPSIS
package MyFilter;
use base qw( HTTP::Proxy::HeaderFilter );
# changes the User-Agent header in all requests
# this filter must be pushed on the request stack
sub filter {
my ( $self, $headers, $message ) = @_;
$message->headers->header( User_Agent => 'MyFilter/1.0' );
}
1;
DESCRIPTION
The HTTP::Proxy::HeaderFilter class is used to create filters for HTTP request/response headers.
Creating a HeaderFilter
A HeaderFilter is just a derived class that implements some methods called by the proxy. Of all the methods presented below, only
"filter()" must be defined in the derived class.
filter()
The signature of the filter() method is the following:
sub filter { my ( $self, $headers, $message) = @_; ... }
where $self is the filter object, $headers is a HTTP::Headers object, and $message is either a HTTP::Request or a HTTP::Response
object.
The $headers HTTP::Headers object is the one that will be sent to the client (if the filter is on the response stack) or origin server
(if the filter is on the request stack). If $headers is modified by the filter, the modified headers will be sent to the client or
server.
The init() method (if it exists) is called by the new() constructeur to perform all initisalisation tasks. It's called once in the
filter lifetime.
A HTTP::Proxy::HeaderFilter object is a blessed hash, and the base class reserves only hash keys that start with "_hphf".
new()
The constructor is defined for all subclasses. Initialisation tasks (if any) for subclasses should be done in the "init()" method (see
below).
init()
This method is called by the "new()" constructeur to perform all initisalisation tasks. It's called once in the filter lifetime.
It receives all the parameters passed to "new()".
Standard HeaderFilters
Standard HTTP::Proxy::HeaderFilter classes are lowercase.
The following HeaderFilters are included in the HTTP::Proxy distribution:
simple
This class lets you create a simple header filter from a code reference.
standard
This is the filter that provides standard headers handling for HTTP::Proxy. It is loaded automatically by HTTP::Proxy.
Please read each filter's documentation for more details about their use.
USEFUL METHODS FOR SUBCLASSES
Some methods are available to filters, so that they can eventually use the little knowledge they might have of HTTP::Proxy's internals.
They mostly are accessors.
proxy()
Gets a reference to the HTTP::Proxy objects that owns the filter. This gives access to some of the proxy methods.
AUTHOR
Philippe "BooK" Bruhat, <book@cpan.org>.
SEE ALSO
HTTP::Proxy, HTTP::Proxy::BodyFilter.
COPYRIGHT
Copyright 2003-2005, 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::HeaderFilter(3pm)