01-10-2006
getting multiple xml tag
sorry for the trouble......
i have this file that contains the following:
00:00:21 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:00:21 Sending Message :<EXGC-EXGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>EXGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G33</terminal_id>
<lane_ts>7</lane_ts>
<version>A</version>
<sno>1136908779</sno>
<exit_dt>200601102359</exit_dt>
<gate>3</gate>
<lane>07</lane>
<opr_logon>PD$PRA </opr_logon>
<card_no>003797</card_no>
<nom_hlr_cr_no> </nom_hlr_cr_no>
<nom_pass_ind>Y</nom_pass_ind>
</EXGC-EXGU>
]
00:00:21 Sending Message :<ARGC-ARGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>ARGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G31</terminal_id>
<lane_ts>2</lane_ts>
<version>B</version>
<sno>1136908785</sno>
<ariv_dt>200601102359</ariv_dt>
<gate>3</gate>
<lane>02</lane>
<opr_logon>PD$SDI </opr_logon>
</ARGC-ARGU>
00:00:21 Msg send to Queue=[<ARGC-ARGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>ARGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G31</terminal_id>
<lane_ts>2</lane_ts>
<version>B</version>
<sno>1136908785</sno>
<ariv_dt>200601102359</ariv_dt>
</ARGC-ARGU>
00:00:31 weblogic server=t3://cng3wls8:80
00:00:31 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:00:41 weblogic server=t3://cng3wls8:80
00:00:41 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:00:41 Sending Message :<EXGC-EXGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>EXGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G33</terminal_id>
<lane_ts>8</lane_ts>
<version>A</version>
</EXGC-EXGU>
00:03:02 weblogic server=t3://cng3wls8:80
00:03:02 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:03:12 weblogic server=t3://cng3wls8:80
00:03:12 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:03:12 Sending Message :<pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<system_c>HPREGATE</system_c>
<trans_c>HSPG</trans_c>
<trans_dt>20060111000307</trans_dt>
<user_id_m></user_id_m>
<func_c>C</func_c>
<pm_n>XB 2062M</pm_n>
<chassis_type>45</chassis_type>
<chassis_ulw>00000</chassis_ulw>
<pager_n>94944694</pager_n>
</pregate>
its a very very huge set of data and here are a part of it. I need to get the bold text out and piped each into a text file.
well the sed codes i try out is this:
sed -e 's_^..:..:.. .*<pregate_<pregate_g' raw.txt > pregate.out
sed -e 's_^..:..:.. .*<EXGC-EXGU_<EXGC-EXGU_g' raw.txt > EXGC.out
sed -e 's_^..:..:.. .*<ARGC-ARGU_<ARGC-ARGU_g' raw.txt > ARGC-ARGU.out
but it doesnt works....
any idea?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We have 2 XML file 1. ORIGINAL.xml file and 2. ATTRIBUTE.xml files, In the ORIGINAL.xml we need some modification as <resourceCode>431048</resourceCode>under <item type="Manufactured"> tag - we need to grab the 431048 value from tag and pass it to database table in unix shell script to find the... (0 Replies)
Discussion started by: balrajg
0 Replies
2. Shell Programming and Scripting
Hi All,
Need your assistance on another xml tag related issue. I have a xml file as below:
<INVOICES>
<INVOICE>
<BILL>
<BILL_NO>1234</BILL_NO>
<BILL_DATE>01 JAN 2011</BILL_DATE>
</BILL>
<NAMEINFO>
<NAME>ABC</NAME>
</NAMEINFO>
</INVOICE>
<INVOICE>
<BILL>
<BILL_NO>5678</BILL_NO>... (12 Replies)
Discussion started by: angshuman
12 Replies
3. Shell Programming and Scripting
Hi All,
Find the following code:
<Universal>D38x82j1JJ
</Universal>
I want to retrieve the value of <Universal> tag as below:
Please help me. (3 Replies)
Discussion started by: mjavalkar
3 Replies
4. Shell Programming and Scripting
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies
5. Shell Programming and Scripting
I have this XML file -
<gp>
<mms>1110012</mms>
<tg>988</tg>
<mm>LongTime</mm>
<lv>
<lkid>StartEle=ONE, Desti = Motion</lkid>
<kk>12</kk>
</lv>
<lv>
<lkid>StartEle=ONE, Source = Velocity</lkid>
<kk>2</kk>
</lv>
<lv>
... (3 Replies)
Discussion started by: NeedASolution
3 Replies
6. Shell Programming and Scripting
Hi Guys
Here is my Input :
<?xml version="1.0" encoding="UTF-8"?>
<xn:MeContext id="01736">
<xn:VsDataContainer id="01736">
<xn:attributes>
<xn:vsDataType>vsDataMeContext</xn:vsDataType>
... (12 Replies)
Discussion started by: pareshkp
12 Replies
7. Shell Programming and Scripting
Hi All,
Can someone tell me how can we create same xml tag lines based on the number of lines present in other file and replace the Name variable vaule present in other file.
basically I have this xml line
<typ:RequestKey NameType="RIC" Name="A1" Service="DDA"/>
and say I... (4 Replies)
Discussion started by: Optimus81
4 Replies
8. Shell Programming and Scripting
I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help
File:
<xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies
9. Shell Programming and Scripting
Hi Forum.
I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script.
Any feedback will be greatly appreciated.
... (19 Replies)
Discussion started by: pchang
19 Replies
10. UNIX for Beginners Questions & Answers
I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file:
<EMAIL>***</EMAIL>
<CUSTOMER_ID>****</CUSTOMER_ID>
<BRANDID>***</BRANDID>
Now I want to grep the values of all these specified... (1 Reply)
Discussion started by: shubh752
1 Replies
LEARN ABOUT LINUX
imqkeytool
imqkeytool(1M) System Administration Commands imqkeytool(1M)
NAME
imqkeytool - generate a self-signed certificate for secure communication
SYNOPSIS
/usr/bin/imqkeytool [-broker] [-servlet keystore_location]
/usr/bin/imqkeytool -h
DESCRIPTION
The imqkeytool utility generates a self-signed certificate for secure communication. The certificate can be used by a broker instance to
establish a secure connection with a client, or by a Message Queue-supplied HTTPS servlet to establish a secure connection with a broker
instance. An HTTPS servlet is an SSL-enabled varient of the HyperText Transfer Protocol that establishes a secure connection with a broker
instance.
Without an option, imqkeytool generates a self-signed certificate for a broker instance.
imqkeytool uses command line options to specify whether the certificate is used by a broker instance or by a servlet.
OPTIONS
The following options are supported:
-broker
Generate a self-signed certificate for the broker and places it in the Message Queue keystore. All broker instances running on a system
must use the same certificate.
-h
Display usage help. Do not execute anything else on the command line.
-servlet keystore_location
Generate a self-signed certificate for an HTTPS servlet and places it in keystore_location.
keystore_location refers to the location of the keystore. You should move this keystore to a location where it is accessible and read-
able by the Message Queue HTTPS servlet to establish a secure connection with a broker.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of this command:
IMQ_JAVAHOME Specify the Java 2 compatible runtime. When this environment variable is not set it defaults to /usr/j2se.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/etc/imq/keystore Contains Message Queue keystore in which imqkeytool stores a self-signed certificate for brokers.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWiqu |
+-----------------------------+-----------------------------+
SEE ALSO
imqadmin(1M), imqbrokerd(1M), imqcmd(1M), imqdbmgr(1M), imqobjmgr(1M), imqusermgr(1M), attributes(5)
Sun Java System Message Queue Administrator's Guide
SunOS 5.10 11 Mar 2004 imqkeytool(1M)