06-09-2017
Apologize for the inconsistencies...
This does indeed find every instance and print them out. Nice job!
What I need is for it to find the last instance and return that last one in a string variable so I can pass it onto the next step.
Do you have such an eloquent example of how this might be accomplished as well?
Much appreciated!
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Does anyone know of any tools that manage the rollout of patches across multiple types of Unix platform ( eg Solaris, Aix etc ).
I am looking for something that does a similiar job to SMS or WSUS in the Windows world (3 Replies)
Discussion started by: jimthompson
3 Replies
2. 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
3. UNIX for Dummies Questions & Answers
Hi.
Where can i learn, Which Unix platform specific for what? Properties? (1 Reply)
Discussion started by: Enrgy
1 Replies
4. UNIX and Linux Applications
Hi ;)
Which hardware platforms/machine types use the Operating System Unix?
A list of all would be appreaciated
Thx
Megadrink :cool: (2 Replies)
Discussion started by: Megadrink
2 Replies
5. Shell Programming and Scripting
Hi all
I've been working on a bash script parsing through debug/trace files and extracting all lines that relate to some search string. So far, it works pretty well. However, I am challenged by one requirement that is still open.
What I want to do:
1) parse through a file and identify all... (3 Replies)
Discussion started by: reminder
3 Replies
6. Programming
I need to find the MAC address of the ethernet cards on the host machine from the C language. I have found a way to do this on Linux using socket(), ioctl() and the ifreq structure. But this does not seem to work on AIX, HP/UX and probably the others I need (Solaris, SCO, Alpha etc).
Is there a... (7 Replies)
Discussion started by: Pug
7 Replies
7. Shell Programming and Scripting
I got multple sql files.such as
>>vi abc.sql
select A.SITENAME,
NULL
NULL
A.CREATE_DTM
NULL
A.MODIFY_DTM
NULL
FROM ${STG_RET_ITEM} A INNER JOIN ${STG_INC_COMP} B ON (A.CUSTID=B.CUSTID)
LEFT OUTER JOIN ( select C.SITEID,SITESTATUS,MIN_EFF_DT,CURR_ST_DT,MAX_IN_DT,MAX_ACT_DT
from... (4 Replies)
Discussion started by: ali123
4 Replies
8. Shell Programming and Scripting
Can somebody refer me following multicheck to perform across most of unix platform like AIX, HP-UX, solaris, Linux.
CPU utilization above X%
Check IO above X%
Swap usage check above X%
Memory utilization above X% ... (3 Replies)
Discussion started by: sendtoshailesh
3 Replies
9. Shell Programming and Scripting
Hi,
I have a string which can be completely unstructred. I am looking to parse out values within that String.
Here is an example
<Random Strings> String1=<some number a> String2=<some number b> String3=<some number c> Satish=<some number d> String4=<some number e>
I only want to parse out... (1 Reply)
Discussion started by: satishrao
1 Replies
10. Shell Programming and Scripting
from the CLI on a Mac, if you type networksetup -listallnetworkservices then you get results in a multi-line paragraph that look something like this:
networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
Wi-Fi
Display Ethernet
Bluetooth DUN... (7 Replies)
Discussion started by: hungryd
7 Replies
LEARN ABOUT DEBIAN
xml::node
Node(3pm) User Contributed Perl Documentation Node(3pm)
NAME
XML::Node - Node-based XML parsing: an simplified interface to XML::Parser
SYNOPSIS
use XML::Node;
$xml_node = new XML::Node;
$xml_node->register( $nodetype, $callback_type => &callback_function );
$xml_node->register( $nodetype, $callback_type => $variable );
open(FOO, 'xmlgenerator |');
$p3->parse(*FOO);
close(FOO);
$xml_node->parsefile( $xml_filename );
DESCRIPTION
If you are only interested in processing certain nodes in an XML file, this module can help you simplify your Perl scripts significantly.
The XML::Node module allows you to register callback functions or variables for any XML node. If you register a call back function, it
will be called when the node of the type you specified are encountered. If you register a variable, the content of a XML node will be
appended to that variable automatically.
Subroutine register accepts both absolute and relative node registrations.
Here is an example of absolute path registration:
1. register(">TestCase>Name", "start" => &handle_TestCase_Name_start);
Here are examples of single node name registration:
2. register( "Name", "start" => &handle_Name_start);
3. register( "Name", "end" => &handle_Name_end);
4. register( "Name", "char" => &handle_Name_char);
Here is an example of attribute registration:
5. register(">TestCase:Author", "attr" => $testcase_author);
Abosolute path trigger condition is recommended because a "Name" tage could appear in different places and stands for differe names.
Example:
1 <Testcase>
2 <Name>Something</Name>
3 <Oracle>
4 <Name>Something</Name>
5 </Oracle>
6 </Testcase>
Statement 1 causes &handle_TestCase_Name_start to be called when parsing Line 2. Statements 2,3,4 cause the three handler subroutines to be
called when parsing both Line 2 and Line 4.
This module uses XML::Parser.
EXAMPLE
Examples "test.pl" and "parse_orders.pl" come with this perl module.
SEE ALSO
XML::Parser
NOTE
When you register a variable, XML::Node appends strings found to that variable. So please be sure to clear that variable before it is used
again.
AUTHORS
Chang Liu <liu@ics.uci.edu>
LAST MODIFIED
$Date: 2001/12/10 11:38:28 $
perl v5.10.0 2001-12-11 Node(3pm)