Sponsored Content
Top Forums Shell Programming and Scripting How to extract data from xml file using shell scripting? Post 302843127 by arun_kohan on Monday 12th of August 2013 06:51:25 AM
Old 08-12-2013
Thanks for replying Mr Singh..

The input code is
Code:
 TimeStamp="1234567890" Data="t2u A 2 9020 585269098"/>
 TimeStamp="1234567890" Data="t2uX 2 9020 585269098"/>
 TimeStamp="1234567892" Data="t2u A 1 9000 585269099"/>
<TimeStamp="1234567892" Data="t2u X 1 9000 585269099"/>
TimeStamp="1234567894" Data="t6u X 192 9000 111883500"/>
TimeStamp="1374201903" Data="t6u A 192 9000 111883500"


And i want it to arrange it by column wise :
Code:
  Timestamp     t2u     t6u    A   X    9020 
 
1.1234567890   t2u             A         9020
2.1234567890    t2u                  X   9020
3.
4.
5..
6.

Thanks in advance

Last edited by Scott; 08-12-2013 at 11:00 AM.. Reason: Added code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract data from xml- shell script using awk

Hi, This is the xml file that i have. - <front-servlet platform="WAS4.0" request-retriever="SiteMinder-aware" configuration-rescan-interval="60000"> <concurrency-throttle maximum-concurrency="50" redirect-page="/jsp/defaulterror.jsp" /> - <loggers> <instrumentation... (5 Replies)
Discussion started by: nishana
5 Replies

2. Shell Programming and Scripting

extract specific data from xml format file.

Hi, I need to extract the start time value (bold, red font) under the '<LogEvent ID="Timer Start">' tag (black bold) from a file with the following pattern. There are other LogEventIDs listed in the file as well, making it harder for me to extract out the specific start time that I need. . .... (7 Replies)
Discussion started by: 60doses
7 Replies

3. Shell Programming and Scripting

Help with shell script to extract data from XML file

Hello Scripting Gurus, I need help with extracting data from the XML file using shell script. The data is in a large XML and I need to extract the id values of all completedworkflows. Here is a sample of it. Input and output data is also in the attached text files. <wfregistry>... (5 Replies)
Discussion started by: yajaykumar
5 Replies

4. Shell Programming and Scripting

sed or awk to extract data from Xml file

Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result : mon titre 1;Createur1;Dossier1 mon titre 1;Createur1;Dossier1 and save it in cvs file (fichier.cvs). FROM this Xml file (test.xml): <playlist version="1"> <trackList> <track>... (1 Reply)
Discussion started by: yeclota
1 Replies

5. Shell Programming and Scripting

Shell scripting to extract data from file

Hi, i want to fetch the data from the alert log file, for a particular time interval. Example : Alert log content : Thu Mar 18 08:47:36 2010 Completed: alter database open Thu Mar 18 19:13:38 2010 MMNL absent for 6390 secs; Foregrounds taking over Fri Mar 19 08:30:52 2010... (1 Reply)
Discussion started by: Pinki018
1 Replies

6. Shell Programming and Scripting

Data Extract from XML Log File

Please help me out to extract the Data from the XML Log files. So here is the data ERROR|2010-08-26 00:05:52,958|SERIAL_ID=128279996|ST=2010-08-2600:05:52|DEVICE=113.2.21.12:601|TYPE=TransactionLog... (9 Replies)
Discussion started by: raghunsi
9 Replies

7. Shell Programming and Scripting

Shell script to extract data in repeating tags from xml

Hi, I am new to shell scripting. I need to extract data between repeating tags from an xml file and store the data in an array to process it further. <ns1:root xmlns:ns1="http://example.com/config"> <ns1:interface>in1</ns1:interface> <ns1:operation attribute1="true" attribute2="abd"... (2 Replies)
Discussion started by: sailendra
2 Replies

8. Shell Programming and Scripting

Extract data from XML file

Hi , I have input file as XML. following are input data #complex.xml <?xml version="1.0" encoding="UTF-8"?> <TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: mohan sharma
1 Replies

9. Shell Programming and Scripting

How to extract data from XML file using shell scripting?

Hi , I have input file as XML. following are input data #complex.xml Code: <?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: arun_kohan
1 Replies

10. Shell Programming and Scripting

Extract Data from XML file.

Hi Guys, I am in a need to extract data from a xml file. The XML file format is as below. <data jsxnamespace="propsbundle" locales=""> <locale> <!--Error messages starts--> <record jsxid="CHARPAIR001" jsxtext=" must be selected"></record> <record... (1 Reply)
Discussion started by: Showdown
1 Replies
Data::AMF(3pm)						User Contributed Perl Documentation					    Data::AMF(3pm)

NAME
Data::AMF - serialize / deserialize AMF data SYNOPSIS
use Data::AMF; my $amf0 = Data::AMF->new( version => 0 ); my $amf3 = Data::AMF->new( version => 3 ); # AMF0 to Perl Object my $obj = $amf0->deserialize($data); # Perl Object to AMF0 my $data = $amf0->serialize($obj); DESCRIPTION
This module is (de)serializer for Adobe's AMF (Action Message Format). Data::AMF is core module and it recognize only AMF data, not AMF packet. If you want to read/write AMF Packet, see Data::AMF::Packet instead. SEE ALSO
Data::AMF::Packet, Catalyst::Controller::FlashRemoting NOTICE
Data::AMF is currently in a very early alpha development stage. The current version is not support AMF3, and application interface is still fluid. METHOD
new(%option) Create Data::AMF object. Option parameters are: version Target AMF version. It should be 0 or 3. (default 0 for AMF0) serialize($obj) Serialize perl object ($obj) to AMF, and return the AMF data. deserialize($amf) Deserialize AMF data to perl object, and return the perl object. AUTHOR
Daisuke Murase <typester@cpan.org> COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.12.4 2010-08-31 Data::AMF(3pm)
All times are GMT -4. The time now is 11:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy