10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
im trying to get
awk to print the string between 3rd and 4th backslashs to end of line
test could be any word
this
http://example.com/test/ >to this
http://example.com/test/ > testalso the other way round insert string at end of line... (13 Replies)
Discussion started by: bob123
13 Replies
2. Shell Programming and Scripting
input
"A","B","C,D","E","F"
"S","T","U,V","W","X"
"AA","BB","CC,DD","EEEE","FFF"
required output:
"A","B","C,D","C,D","F"
"S", T","U,V","U,V","X"
"AA","BB","CC,DD","CC,DD","FFF"
tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Discussion started by: khblts
5 Replies
3. UNIX for Dummies Questions & Answers
<?xml version = '1.0' encoding =... (8 Replies)
Discussion started by: Siva SQL
8 Replies
4. Shell Programming and Scripting
I have a file which contains fields comma separated & with each field surrounded by quotes. The 4th field contains either a serial number, the text ABC, the text XYZ or it's blank. I want to only extract records which have a serial number. Here's some sample data:
> cat myfile... (4 Replies)
Discussion started by: CHoggarth
4 Replies
5. UNIX for Dummies Questions & Answers
I have a flatfile A.txt
date|products|notes|location
121117|a108|this is a test|florida
121118|b111|just test it|tampa
How do i write an awk to create a file name as location.txt and have products:notes
awk -F'|' '{ print $2 ":" $3 }' A.txt > $4.txt
I am sure it cannot write to... (5 Replies)
Discussion started by: sabercats
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Can anyone let me know the command to know the list of filenames that have string 31 in their 4th and 5th positions inside the file:
grep -l "31" main*.txt
The above grep lists all the files which have 31 at any position but I want filenames having 31 at position 4 and position 5. (8 Replies)
Discussion started by: okkadu
8 Replies
7. UNIX for Advanced & Expert Users
I want to know how to, given a string like W87151WR71C, if the 4th and 5th character (in this case 15) are greater than 45, then to add 1 to the 3rd character (in this case 7) and assign the revised string the variable name MODSTRING.
Thanks in advance. This is ultimately to grab info from... (6 Replies)
Discussion started by: glev2005
6 Replies
8. Shell Programming and Scripting
Hi,
Shell script: I would need help on How to extract 3rd line 4th column of a file with single liner
Thanks in advance. (4 Replies)
Discussion started by: krishnamurthig
4 Replies
9. Shell Programming and Scripting
I have a rather large file with XML-style content. Each line contains one full XML entry. For example:
1:<Message><DNIS>1234</DNIS><UCID>3456</UCID><TransferGroup>XYZXYZ</TransferGroup></Message>
2:<Message><DNIS>9999</DNIS><UCID>2584</UCID><TransferGroup>ABCABC</TransferGroup></Message>... (1 Reply)
Discussion started by: sharpi03
1 Replies
10. Shell Programming and Scripting
Whats up fellas... hope someone can help me with the following...
I am parsing an file that is space delimited, however, in the middle, there is an ugly "Account Name" feild that in itself has multiple varying spaces, and commas which throws off my script.
The 1st 3 feilds I am able to obtain... (8 Replies)
Discussion started by: djsal
8 Replies
HTML::Quoted(3pm) User Contributed Perl Documentation HTML::Quoted(3pm)
NAME
HTML::Quoted - extract structure of quoted HTML mail message
SYNOPSIS
use HTML::Quoted;
my $html = '...';
my $struct = HTML::Quoted->extract( $html );
DESCRIPTION
Parses and extracts quotation structure out of a HTML message. Purpose and returned structures are very similar to Text::Quoted.
SUPPORTED FORMATS
Variouse MUAs use quite different approaches for quoting in mails.
Some use blockquote tag and it's quite easy to parse.
Some wrap text into p tags and add '>' in the beginning of the paragraphs.
Things gettign messier when it's an HTML reply on plain text mail thread.
If you found format that is not supported then file a bug report via rt.cpan.org with as short as possible example. Test file is even
better. Test file with patch is the best. Not obviouse patches without tests suck.
METHODS
extract
my $struct = HTML::Quoted->extract( $html );
Takes a string with HTML and returns array reference. Each element in the array either array or hash. For example:
[
{ 'raw' => 'Hi,' },
{ 'raw' => '<div><br><div>On date X wrote:<br>' },
[
{ 'raw' => '<blockquote>' },
{ 'raw' => 'Hello,' },
{ 'raw' => '<div>How are you?</div>' },
{ 'raw' => '</blockquote>' }
],
...
]
Hashes represent a part of the html. The following keys are meaningful at the moment:
o raw - raw HTML
o quoter_raw, quoter - raw and decoded (entities are converted) quoter if block is prefixed with quoting characters
AUTHOR
Ruslan.Zakirov <ruz@bestpractical.com>
LICENSE
Under the same terms as perl itself.
perl v5.10.1 2011-01-09 HTML::Quoted(3pm)