01-08-2013
Wow, it works. Thank you very much for your help rangarasan
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have two files and data looks like this:
File1 Contents
#Field1,Field2
Dist_Center_file1.txt;21
Dist_Center_file3.txt;20
Dist_Center_file2.txt;20
File2 Contents (*** No Header ***)
Dist_Center_file1.txt;23
Dist_Center_file2.txt;20
Dist_Center_file3.txt;20
I have... (4 Replies)
Discussion started by: Hangman2
4 Replies
2. Shell Programming and Scripting
Hi unix gurus,
I have a urgent requirement, I need to write a AWK script to compare each fields in 2 files using AWK.
Basically my output should be like this.
file1
row|num1|num2|num3
1|one|two|three
2|one|two|three
file2
row|num1|num2|num3
1|one|two|three
2|one|two|four
... (5 Replies)
Discussion started by: rashmisb
5 Replies
3. Shell Programming and Scripting
Hi All,
Looking for a quick AWK script to output some differences between two files.
FILE1
device1 1.1.1.1 PINGS
device1 2.2.2.2 PINGS
FILE2
2862 SITE1 device1-prod 1.1.1.1 icmp - 0 ... (4 Replies)
Discussion started by: stacky69
4 Replies
4. Shell Programming and Scripting
Dear experts
I have files like
ABD : 5869 events, relative ratio : 1.173800E-01 , sum of ratios : 1.173800E-01
VBD : 12147 events, relative ratio : 2.429400E-01 , sum of ratios : 3.603200E-01
SDF : 17000 events, relative ratio : 3.400000E-01 , sum of ratios : 7.003200E-01
OIP: 14984... (9 Replies)
Discussion started by: Alkass
9 Replies
5. Shell Programming and Scripting
HI
I'm having some troubles to compare and permut diffrent fields indexed with another filed like the following example `:
file1
1 1
2 2
3 3
file2
7 1
9 2
10 3
result------------------- (6 Replies)
Discussion started by: yassinegoth
6 Replies
6. Shell Programming and Scripting
Hi,
I need the most efficient way of comparing the following and arriving at the result
I have a file which has entries like,
File1:
1|2|5|7|8|2|3|6|3|1
File2:
1|2|3|1|2|7|9|2
I need to compare the entries in these two file with those of a general file,
1|2|3|5|2|5|6|9|3|1... (7 Replies)
Discussion started by: pradebban
7 Replies
7. Shell Programming and Scripting
Hi,
I have two text files, compare column one in both the files and if it matches then the output should contain the id in column one, the number and the description.
Both the files are sorted. Is there a one liner to get this done, kindly help. Thank you
File 1:
NC_000964 92.33 ... (2 Replies)
Discussion started by: pulikoti
2 Replies
8. Shell Programming and Scripting
Guys,
I tried searching on the internet and I couldn't get the answer for this problem. I have 3 files. First 2 fields of all of them are of same type, say they come from various databases but first two fields in the 3 files means the same.
I need to verify the entries that are not present... (4 Replies)
Discussion started by: PikK45
4 Replies
9. Shell Programming and Scripting
Hi,
I am trying to check two files based on certain string and field.
cat f1
source=\GREP\"
hi this \\
source=\SED\"
skdmsmd
dnksdns
source=\PERL\"
cat f2
source=\SED\"
source=\GREP\"
vlamskds
amdksk m
source=\AWK\"
awk \here\" (3 Replies)
Discussion started by: greet_sed
3 Replies
10. UNIX for Beginners Questions & Answers
Hi,
Below are the sample files. x.txt is from an Excel file that is a list of users from Windows and y.txt is a list of database account.
$ head -500 x.txt y.txt
==> x.txt <==
TEST01 APP_USER_PROFILE
USER03 APP_USER_PROFILE
TEST02 APP_USER_EXP_PROFILE
TEST04 APP_USER_PROFILE
USER01 ... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT CENTOS
html::assubs
HTML::AsSubs(3) User Contributed Perl Documentation HTML::AsSubs(3)
NAME
HTML::AsSubs - functions that construct a HTML syntax tree
VERSION
This document describes version 5.03 of HTML::AsSubs, released September 22, 2012 as part of HTML-Tree.
SYNOPSIS
use HTML::AsSubs;
$h = body(
h1("This is the heading"),
p("This is the first paragraph which contains a ",
a({href=>'link.html'}, "link"),
" and an ",
img({src=>'img.gif', alt=>'image'}),
"."
),
);
print $h->as_HTML;
DESCRIPTION
This module exports functions that can be used to construct various HTML elements. The functions are named after the tags of the
corresponding HTML element and are all written in lower case. If the first argument is a hash reference then it will be used to initialize
the attributes of this element. The remaining arguments are regarded as content.
For a similar idea (i.e., it's another case where the syntax tree of the Perl source mirrors the syntax tree of the HTML produced), see
HTML::Element's "new_from_lol" method.
For what I now think is a cleaner implementation of this same idea, see the excellent module "XML::Generator", which is what I suggest for
actual real-life use. (I suggest this over "HTML::AsSubs" and over "CGI.pm"'s HTML-making functions.)
ACKNOWLEDGEMENT
This module was inspired by the following message:
Date: Tue, 4 Oct 1994 16:11:30 +0100
Subject: Wow! I have a large lightbulb above my head!
Take a moment to consider these lines:
%OVERLOAD=( '""' => sub { join("", @{$_[0]}) } );
sub html { my($type)=shift; bless ["<$type>", @_, "</$type>"]; }
:-) I *love* Perl 5! Thankyou Larry and Ilya.
Regards,
Tim Bunce.
p.s. If you didn't get it, think about recursive data types: html(html())
p.p.s. I'll turn this into a much more practical example in a day or two.
p.p.p.s. It's a pity that overloads are not inherited. Is this a bug?
BUGS
The exported link() function overrides the builtin link() function. The exported tr() function must be called using &tr(...) syntax
because it clashes with the builtin tr/../../ operator.
SEE ALSO
HTML::Element, XML::Generator
html head title base link meta isindex nextid script style body h1 h2 h3 h4 h5 h6 p pre div blockquote a img br hr ol ul dir menu li dl dt dd
dfn cite code em kbd samp strong var address span b i u tt center font big small strike sub sup table tr td th caption form input select
option textarea object applet param map area frame frameset noframe
A bunch of methods for creating tags.
Private Functions
_elem()
The _elem() function is wrapped by all the html 'tag' functions. It takes a tag-name, optional hashref of attributes and a list of content
as parameters.
AUTHOR
Current maintainers:
o Christopher J. Madsen "<perl AT cjmweb.net>"
o Jeff Fearn "<jfearn AT cpan.org>"
Original HTML-Tree author:
o Gisle Aas
Former maintainers:
o Sean M. Burke
o Andy Lester
o Pete Krawczyk "<petek AT cpan.org>"
You can follow or contribute to HTML-Tree's development at <http://github.com/madsen/HTML-Tree>.
COPYRIGHT AND LICENSE
Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy Lester, 2006 Pete Krawczyk, 2010 Jeff Fearn, 2012 Christopher J. Madsen.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The programs in this library are distributed in the hope that they will be useful, but without any warranty; without even the implied
warranty of merchantability or fitness for a particular purpose.
perl v5.16.3 2014-06-10 HTML::AsSubs(3)