Sponsored Content
Top Forums Shell Programming and Scripting read xml tag attribute and store it in variable Post 302320770 by sai21 on Thursday 28th of May 2009 11:58:18 PM
Old 05-29-2009
Error

Here is the solution

tranOrder=$(sed '/transaction/s/\(.*transaction=\)\(.*\)/\2/' fileName|awk -F\" '{print $2}')
docMode=$(sed '/document_mode/s/\(.*document_mode=\)\(.*\)/\2/' fileName|awk -F\" '{print $2}')
echo $tranOrder $docMode
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command to remove attribute of an html tag

Is there any shell command to clean an html tag of its attributes. For ex <p align ="center"> with <p>. Thanks for your help!! (2 Replies)
Discussion started by: parshant_bvcoe
2 Replies

2. Shell Programming and Scripting

grep attribute value pair and store it a variable

Hi, I have a file contains attribute value pair like.. ..name=erick rollno=583.0 pass=recon.. From the above line, i need to grep for only "rollno" and store "rollno=583.0" in a variable. Pls suggest (6 Replies)
Discussion started by: skraja1982
6 Replies

3. Shell Programming and Scripting

Extracting the value of an attribute tag from XML

Greetings, I am very new to the UNIX shell scripting and would like to learn. However, I am currently stuck on how to process the below sample of code from an XML file using UNIX comands: <ATTRIBUTE NAME="Memory" VALUE="512MB"/> <ATTRIBUTE NAME="CPU Speed" VALUE="3.0GHz"/> <ATTRIBUTE... (5 Replies)
Discussion started by: JesterMania
5 Replies

4. Shell Programming and Scripting

Extracting the value of an middle attribute tag from XML

Hi All, Please help me out in resolving this.. <secondTag enabled='true' processName='test1' pidFile='/tmp/test1.pid' /> From the above tag, I'm trying to retrieve the value of enabled and pidFile attributes by means of processName attribute. Would be thankful in resolving this..... (5 Replies)
Discussion started by: mjavalkar
5 Replies

5. Shell Programming and Scripting

how to read the variable from tags based on appropriate tag

Hi, I've got a situation where I need to read the values from XML tags in a file. Please find the sample xml code below: <entity> <name>Testing</name> <number>11</number> <template>testing.testing</template> </entity> <entity> <name>Development</name> <number>13</number>... (13 Replies)
Discussion started by: mjavalkar
13 Replies

6. UNIX for Advanced & Expert Users

Shell Script to read XML tags and the data within that tag

Hi unix Gurus, I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information. For example <SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (2 Replies)
Discussion started by: SmilePlease
2 Replies

7. Shell Programming and Scripting

How to read a value from a file and store in a variable?

Hi, I have a file service.xml which has following content: <?xml version="1.0" encoding="UTF-8"?> <Service Ver="2.31.13"/> I want to read the value of Ver (that is 2.31.13) and assign to a variable which i further use. Please help me in that. (3 Replies)
Discussion started by: laxmikant15
3 Replies

8. Shell Programming and Scripting

Read xml tags and then remove the tag using shell script

<Start> <Header> This is header section </Header> <Body> <Body_start> This is body section <a> <b> <c> <st>111</st> </c> <d> <st>blank</st> </d> </b> </a> </Body_start> <Body_section> This is body section (3 Replies)
Discussion started by: RJG
3 Replies

9. Shell Programming and Scripting

Moving XML tag/contents after specific XML tag within same file

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
INGRES_COMMIT(3)							 1							  INGRES_COMMIT(3)

ingres_commit - Commit a transaction

SYNOPSIS
bool ingres_commit (resource $link) DESCRIPTION
ingres_commit(3) commits the currently open transaction, making all changes made to the database permanent. This closes the transaction. A new transaction can be opened by sending a query with ingres_query(3). You can also have the server commit automatically after every query by calling ingres_autocommit(3) before opening the transaction. By default Ingres will roll back any uncommitted transactions at the end of a request. Use this function or ingres_autocommit(3) to ensure your that data is committed to the database. PARAMETERS
o $link - The connection link identifier RETURN VALUES
Returns TRUE on success or FALSE on failure. SEE ALSO
ingres_query(3), ingres_rollback(3), ingres_autocommit(3). PHP Documentation Group INGRES_COMMIT(3)
All times are GMT -4. The time now is 07:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy