Sponsored Content
Top Forums Shell Programming and Scripting Multiple command execution inside awk command during xml parsing Post 302768473 by DGPickett on Friday 8th of February 2013 03:46:55 PM
Old 02-08-2013
JAVA, PERL and C++ have true XML parsers. Awk can handle some xml layouts but might get tangled in others just as valid. Tools like XPath, XQuery, XSLT and JAX can script XML solutions. XQuery - Wikipedia, the free encyclopedia Java XML - Wikipedia, the free encyclopedia
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execution of awk command in a variable

Hi All, I have a awk command that is stored in a variable. the value of the variable cmd is: (mean output of echo $cmd is: ) awk -F";" '{print $1}' Now I want to execute this command. How can I do that???? Quick Reply will be appreciated. Regards, Amit (2 Replies)
Discussion started by: patelamit009
2 Replies

2. Shell Programming and Scripting

Execution problems using awk command.

Hi All, I have the following requirement. In a directory i get files from external source. I at regular intervals check that directory for any incoming files. The file name is underscore delimited. Such as: aaa_bbb_ccc_ddd_eee_fff.dat I am using awk and and splitting the file name. ... (4 Replies)
Discussion started by: satishpv_2002
4 Replies

3. Shell Programming and Scripting

Multiple command execution

I want to open more than 2 files(f1,f2). commands for opening those files are stored in one file (f3). command to execute the file (f3). (3 Replies)
Discussion started by: Mahendravarma
3 Replies

4. Shell Programming and Scripting

Parallel execution of command inside file

Hi all, I have the requirement to generate the file containing following command eval /path/ dsjob -logdetail projectname JOBNAME /path/ 1. The file contains the above command say about 150 times i,e only the JOBNAME changes in every command 2. The commands must be written in such a way... (2 Replies)
Discussion started by: sanjay mn
2 Replies

5. Shell Programming and Scripting

Help in using date command inside awk

Hi All, bash-3.2$ autorep -J BOX_NAME% -l0 | grep BOX_NAME| awk -f awkScript.awk sh: -c: line 0: unexpected EOF while looking for matching `"' sh: -c: line 1: syntax error: unexpected end of file BOX_NAME SU 06/21/2013 03:44:03 06/21/2013 07:46:37 0 #My awkfile { ... (3 Replies)
Discussion started by: ddspark
3 Replies

6. Shell Programming and Scripting

Grep command inside awk

Hi, I would like to use grep command inside awk. Here is my requirement below : file.txt col1 col2 col3 col 4 col 5 wrxwrx 124 jun 3 Sensex.EMEA wrxwrx 120 jun 4 Emex.US wrxwrx 130 feb 3 passion.AUS wrxwrx 145 feb 9 lession.AUS wrxwrx 130 feb 5 pass.US wrxwrx 130 feb 8... (5 Replies)
Discussion started by: Balasankar
5 Replies

7. Shell Programming and Scripting

Execution Problem with awk command

Hi All, I am trying to find a word from a file in loop. while read i; do DB_Name=$i awk '{for(i=1;i<=NF;i++)if($i~/$DB_Name/)print $(i)}' $BTEQ_NAME > $DB_Name_TableList.txt done <Param.txt here Param.txt contents data as ODS_TARGT_RECV FIN_TARGT... (7 Replies)
Discussion started by: Shilpi Gupta
7 Replies

8. Shell Programming and Scripting

Parsing XML using command line

Hi Experts, How do I parse a XML with below contents <saw:user name="mbussey@xyz.com" /> <saw:user name="kimmy.chan@pqr.com" /> <saw:user name="chudgins@gmail.com" /> and retrieve below output ? mbussey@xyz.com kimmy.chan@pqr.com chudgins@gmail.com ... (17 Replies)
Discussion started by: pauldx
17 Replies

9. Shell Programming and Scripting

Parsing OSX UNIX command results which print in multiple lines

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

10. UNIX for Advanced & Expert Users

awk trouble inside another command

I tried running this. dsh -w server1 'lsof /audit | awk '{ print $2 }'' It did not like above so I tried to escape the single parenthesis at the end. dsh -w server1 'lsof /audit | awk '{ print $2 }\'' It then hung so I changed up the parenthesis to this. This worked. dsh -w server1... (6 Replies)
Discussion started by: cokedude
6 Replies
XML::RSS::Headline(3pm) 				User Contributed Perl Documentation				   XML::RSS::Headline(3pm)

NAME
XML::RSS::Headline - Persistant XML RSS Encapsulation VERSION
2.2 SYNOPSIS
Headline object to encapsulate the headline/URL combination of a RSS feed. It provides a unique id either by way of the URL or by doing an MD5 checksum on the headline (when URL uniqueness fails). CONSTRUCTOR
XML::RSS::Headline->new( headline => $headline, url => $url ) XML::RSS::Headline->new( item => $item ) A XML::RSS::Headline object can be initialized either with headline/url or with a parse XML::RSS item structure. The argument 'head- line_as_id' is optional and takes a boolean as its value. METHODS
$headline->id The id is our unique identifier for a headline/url combination. Its how we can keep track of which headlines we have seen before and which ones are new. The id is either the URL or a MD5 checksum generated from the headline text (if $headline->headline_as_id is true); $headline->multiline_headline This method returns the headline as either an array or array reference based on context. It splits headline on newline characters into the array. $headline->item( $item ) Init the object for a parsed RSS item returned by XML::RSS. $headline->set_first_seen $headline->set_first_seen( Time::HiRes::time() ) Set the time of when the headline was first seen. If you pass in a value it will be used otherwise calls Time::HiRes::time(). $headline->first_seen The time (in epoch seconds) of when the headline was first seen. $headline->first_seen_hires The time (in epoch seconds and milliseconds) of when the headline was first seen. GET
/SET ACCESSOR METHODS $headline->headline $headline->headline( $headline ) The rss headline/title. HTML::Entities::decode_entities is used when the headline is set. (not sure why XML::RSS doesn't do this) $headline->url $headline->url( $url ) The rss link/url. URI->canonical is called to attempt to normalize the URL $headline->description $headline->description( $description ) The description of the RSS headline. $headline->headline_as_id $headline->headline_as_id( $bool ) A bool value that determines whether the URL will be the unique identifier or the if an MD5 checksum of the RSS title will be used instead. (when the URL doesn't provide absolute uniqueness or changes within the RSS feed) This is used in extreme cases when URLs aren't always unique to new healines (Use Perl Journals) and when URLs change within a RSS feed (www.debianplanet.org / debianplanet.org / search.cpan.org,search.cpan.org:80) $headline->timestamp $headline->timestamp( Time::HiRes::time() ) A high resolution timestamp that is set using Time::HiRes::time() when the object is created. AUTHOR
Jeff Bisbee, "<jbisbee at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-xml-rss-feed at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-RSS-Feed>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc XML::RSS::Headline You can also look for information at: * AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/XML-RSS-Feed> * CPAN Ratings <http://cpanratings.perl.org/d/XML-RSS-Feed> * RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-RSS-Feed> * Search CPAN <http://search.cpan.org/dist/XML-RSS-Feed> ACKNOWLEDGEMENTS
Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. COPYRIGHT &; LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
XML::RSS::Feed, XML::RSS::Headline::PerlJobs, XML::RSS::Headline::Fark, XML::RSS::Headline::UsePerlJournals, POE::Component::RSSAggregator perl v5.8.8 2006-07-17 XML::RSS::Headline(3pm)
All times are GMT -4. The time now is 09:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy