I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part.
Same problem happens in "type" command in MS-DOS.
I know you can do it by opening it in Internet Explorer,... (4 Replies)
Hi All,
I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML.
If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it?
How do I do... (1 Reply)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
I need a script that can do this:
A script that searches all directories and subdirectories for .html files
When a .html file is found it creates a index.html file in that folder.
It then edits the index.html file and inserts links to all of the .html files that are in that folder into the... (5 Replies)
I was trying to parse the text file, which will looks like this
###XYZABC####
############
int = 4
char = 1
float = 1
.
.
############
like this my text file will contains lots of entries and I need to store these entries in the map eg. map.first = int and map.second = 4 same way I... (5 Replies)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Hi there, I'm quite new to the forum and shell scripting.
I want to filter out the "166.0 points". The results, that i found in google / the forum search didn't helped me :(
<a href="/user/test" class="headitem menu" style="color:rgb(83,186,224);">test</a><a href="/points" class="headitem... (1 Reply)
Hi Guys,
I have a list a hotels stored in many different text files.
This list is kept in the following format:
20/03
Hotel:
The Bear Hotel
Honey Street
Woodstock
UK
Tel:+44-xxxxxx
Rate: 100
21/03
Hotel:
The Bush Hotel
Nice Street
Farnham (4 Replies)
Hi all,
Is there any out there have a brilliant idea on how to export html table data as .csv or write to txt file with separated comma and also get the filename of link from every table and put one line per rows each table.
Please see the attached html and PNG of what it looks like.
... (7 Replies)
I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the... (7 Replies)
Discussion started by: DevAakash
7 Replies
LEARN ABOUT REDHAT
http::headers::util
HTTP::Headers::Util(3) User Contributed Perl Documentation HTTP::Headers::Util(3)NAME
HTTP::Headers::Util - Header value parsing utility functions
SYNOPSIS
use HTTP::Headers::Util qw(split_header_words);
@values = split_header_words($h->header("Content-Type"));
DESCRIPTION
This module provides a few functions that helps parsing and construction of valid HTTP header values. None of the functions are exported
by default.
The following functions are available:
split_header_words( @header_values )
This function will parse the header values given as argument into a list of anonymous arrays containing key/value pairs. The function
knows how to deal with ",", ";" and "=" as well as quoted values after "=". A list of space separated tokens are parsed as if they
were separated by ";".
If the @header_values passed as argument contains multiple values, then they are treated as if they were a single value separated by
comma ",".
This means that this function is useful for parsing header fields that follow this syntax (BNF as from the HTTP/1.1 specification, but
we relax the requirement for tokens).
headers = #header
header = (token | parameter) *( [";"] (token | parameter))
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">>
quoted-pair = "" CHAR
parameter = attribute "=" value
attribute = token
value = token | quoted-string
Each header is represented by an anonymous array of key/value pairs. The value for a simple token (not part of a parameter) is
"undef". Syntactically incorrect headers will not necessary be parsed as you would want.
This is easier to describe with some examples:
split_header_words('foo="bar"; port="80,81"; discard, bar=baz')
split_header_words('text/html; charset="iso-8859-1");
split_header_words('Basic realm=""foo\bar""');
will return
[foo=>'bar', port=>'80,81', discard=> undef], [bar=>'baz' ]
['text/html' => undef, charset => 'iso-8859-1']
[Basic => undef, realm => '"fooar"']
join_header_words( @arrays )
This will do the opposite of the conversion done by split_header_words(). It takes a list of anonymous arrays as arguments (or a list
of key/value pairs) and produces a single header value. Attribute values are quoted if needed.
Example:
join_header_words(["text/plain" => undef, charset => "iso-8859/1"]);
join_header_words("text/plain" => undef, charset => "iso-8859/1");
will both return the string:
text/plain; charset="iso-8859/1"
COPYRIGHT
Copyright 1997-1998, Gisle Aas
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
libwww-perl-5.65 2000-09-16 HTTP::Headers::Util(3)