06-30-2008
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I want to parse this file....
( 0 , 0 ) =>heading1
( 0 , 1 ) =>value1.1a
( 0 , 2 ) =>value2.1a
( 1 , 0 ) =>heading2
( 1 , 1 ) =>value1.1b
( 1 , 2 ) =>value2.1b
( 2 , 0 ) =>heading3
( 2 , 1 ) =>value1.1c
( 2 , 2 ) =>value2.1c
( 3 , 0 ) =>heading4
( 3 , 1 ) =>value1.1d
( 3 , 2... (15 Replies)
Discussion started by: tungaw2004
15 Replies
2. Shell Programming and Scripting
I have a binary file a particular format.
It contains the Length Bytes and the Type bytes i.e the first four bytes if the file indicate the length of the Type which is to follow.
for eg, if the int value of the first four bytes is 80, then it means that the length of the following "Type" is 80.... (2 Replies)
Discussion started by: xgringo
2 Replies
3. Shell Programming and Scripting
#! /usr/local/bin/perl -w
$ip = "$ARGV";
$rw = "$ARGV";
$snmpg = "/usr/local/bin/snmpbulkget -v2c -Cn1 -Cn2 -Os -c $rw";
$snmpw = "/usr/local/bin/snmpwalk -Os -c $rw";
$syst=`$snmpg $ip system sysName sysObjectID`;
sysDescr.0 = STRING: Cisco Internetwork Operating System Software... (1 Reply)
Discussion started by: popeye
1 Replies
4. Shell Programming and Scripting
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies
5. Shell Programming and Scripting
I have always struggled when parsing a file vertically vs. by line horizontally. Can't seem to get my head around the concept. Here again I need to convert vertical output to horizontal output.
original output
root@acuransx:bpplsched 2000-STAND3 -v -M acuransx -l
<2>bpplsched: INITIATING:... (4 Replies)
Discussion started by: jouuu
4 Replies
6. Shell Programming and Scripting
I trying to get only the highest version of the file names from an file which has list of file names.
EX:
CATEGORYDISPLAY JSP.A-SRC_BLD;2.4
CATEGORYDISPLAY JSP.A-SRC_BLD;2.5
CATEGORYDISPLAY JSP.A-SRC_BLD;2.1
CATEGORYDISPLAY JSP.A-SRC_BLD;2.2
The Script should display only the highest... (7 Replies)
Discussion started by: rocker_me2002
7 Replies
7. Shell Programming and Scripting
Hi All,
I have an input file something like this:
Line1
Line2
....
LineN
Identifier
( Field1a, Field1b;
Field2a, Field1b;
Field3a, Field1b;
.....
)
LineN+1
LineN+2
etc..
I basically need Field1a, Field2a, Field3a.... from the above file (6 Replies)
Discussion started by: tostay2003
6 Replies
8. Shell Programming and Scripting
All,
Can somebody provide me with some sed expertise on how to parse the
following line.
27-MAR-2011 10:28:01 * (CONNECT_DATA=(SID=dmart)(CID=(PROGRAM=sqlplus)(HOST=mtasnprod1)(USER=mtasnord))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.197.7.47)(PORT=54881)) * establish * dmart * 0
I would like... (3 Replies)
Discussion started by: BeefStu
3 Replies
9. Shell Programming and Scripting
Hi all,
Could anyone help me out?
My input file is like:
M1SYSNPENGGQINDNINYSE21PTMLPENLSLSNYDMDSFLGQFPSDNNMQLPHSTYEQHLQGEQQNPTNPNYFPPEFDEN2VDW1QE2
output is:
M1
M1SYSNPENGGQINDNINYSE2
M1SYSNPENGGQINDNINYSE21
SYSNPENGGQINDNINYSE2
SYSNPENGGQINDNINYSE21 ... (2 Replies)
Discussion started by: yinyuemi
2 Replies
10. Shell Programming and Scripting
Can some body show me a sed command to remove everyhing upto a '/' and
leave the rest of the line.
cat data.out
This is the directory /tmp/xxx/yy.ksh
I only want to get the fullpath name
/tmp/xxx.yy.ksh
Thanks in advance to all who answer. (3 Replies)
Discussion started by: BeefStu
3 Replies
LEARN ABOUT CENTOS
font::ttf::xmlparse
Font::TTF::XMLparse(3) User Contributed Perl Documentation Font::TTF::XMLparse(3)
NAME
Font::TTF::XMLparse - provides support for XML parsing. Requires Expat module XML::Parser::Expat
SYNOPSIS
use Font::TTF::Font;
use Font::TTF::XMLparse;
$f = Font::TTF::Font->new;
read_xml($f, $ARGV[0]);
$f->out($ARGV[1]);
DESCRIPTION
This module contains the support routines for parsing XML and generating the Truetype font structures as a result. The module has been
separated from the rest of the package in order to reduce the dependency that this would bring, of the whole package on XML::Parser. This
way, people without the XML::Parser can still use the rest of the package.
The package interacts with another package through the use of a context containing and element 'receiver' which is an object which can
possibly receive one of the following messages:
XML_start
This message is called when an open tag occurs. It is called with the context, tag name and the attributes. The return value has no
meaning.
XML_end
This messages is called when a close tag occurs. It is called with the context, tag name and attributes (held over from when the tag
was opened). There are 3 possible return values from such a message:
undef This is the default return value indicating that default processing should occur in which either the current element on the
tree, or the text of this element should be stored in the parent object.
$context
This magic value marks that the element should be deleted from the parent. Nothing is stored in the parent. (This rather than
'' is used to allow 0 returns.)
anything
Anything else is taken as the element content to be stored in the parent.
In addition, the context hash passed to these messages contains the following keys:
xml This is the expat xml object. The context is also available as $context->{'xml'}{' mycontext'}. But that is a long winded way of not
saying much!
font
This is the base object that was passed in for XML parsing.
receiver
This holds the current receiver of parsing events. It may be set in associated application to adjust which objects should receive
messages when. It is also stored in the parsing stack to ensure that where an object changes it during XML_start, that that same object
that received XML_start will receive the corresponding XML_end
stack
This is the parsing stack, used internally to hold the current receiver and attributes for each element open, as a complete hierarchy
back to the root element.
tree
This element contains the storage tree corresponding to the parent of each element in the stack. The default action is to push undef
onto this stack during XML_start and then to resolve this, either in the associated application (by changing $context->{'tree'}[-1]) or
during XML_end of a child element, by which time we know whether we are dealing with an array or a hash or what.
text
Character processing is to insert all the characters into the text element of the context for available use later.
METHODS
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 58:
=back doesn't take any parameters, but you said =back 4
Around line 60:
=back doesn't take any parameters, but you said =back 4
Around line 101:
=back doesn't take any parameters, but you said =back 4
perl v5.16.3 2011-10-13 Font::TTF::XMLparse(3)