Sponsored Content
Top Forums Shell Programming and Scripting sed - extract text from xml file Post 302597304 by tarun_agrawal on Friday 10th of February 2012 12:24:44 AM
Old 02-10-2012
try this

Code:
 egrep -o '\$\{[^ ]+\}' filename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract text from xml file

I have some xml files that got created by exporting a website from RedDot. I would like to extract the cost, course number, description, and meeting information. <?xml version="1.0" encoding="UTF-16" standalone="yes" ?> - <PAG PAG0="3AE6FCFD86D34896A82FCA3B7B76FF90" PAG3="525312"... (3 Replies)
Discussion started by: chrisf
3 Replies

2. 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

3. Shell Programming and Scripting

SED extract XML value

I have the following string: <min-pool-size>2</min-pool-size> When I pipe the string into the following code I am expcting for it to return just the value "2", but its just reurning the whole string. Why?? sed -n '/<min-pool-size>/,/<\/min-pool-size>/p' Outputting:... (13 Replies)
Discussion started by: ArterialTool
13 Replies

4. Shell Programming and Scripting

Using SED/AWK to extract xml at end of file

Hello everyone, Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part. What i need to do is, prompt the user for a file to work with, which i have done. promt the user for an output file - which is done. #!/bin/bash... (14 Replies)
Discussion started by: hugh86
14 Replies

5. Shell Programming and Scripting

Need help please with Grep/Sed command to extract text and numbers from a file

Hello All, I need to extract lines from a file that contains ALPHANUMERIC and the length of Alphanumeric is set to 16. I have pasted the sample of the lines from the text file that I have created. My problem is that sometimes 16 appears in other part of the line. I'm only interested to... (14 Replies)
Discussion started by: mnassiri
14 Replies

6. Shell Programming and Scripting

sed extract from xml

I have an xml file that generally looks like this: "<row><dnorpattern>02788920</dnorpattern><description/></row><row><dnorpattern>\+ 44146322XXXX</dnorpattern><description/></row><row><dnorpattern>40XXX</dnorpattern><description/></row><row><dnorpattern>11</dn... (4 Replies)
Discussion started by: garboon
4 Replies

7. Shell Programming and Scripting

Get extract text from xml file

Hi Collegue, i have a file say a.xml. it has contents <bpelFault><faultType>1</faultType><genericSystemFault xmlns=""><part name="payload"><v2:Fault... (10 Replies)
Discussion started by: Jewel
10 Replies

8. Shell Programming and Scripting

Extract a particular xml only from an xml jar file

Hi..need help on how to extract a particular xml file only from an xml jar file... thanks! (2 Replies)
Discussion started by: qwerty000
2 Replies

9. Shell Programming and Scripting

Extract a value from an xml file

I have this XML file format and all in one line: Fri Dec 23 00:14:52 2016 Logged Message:689|<?xml version="1.0" encoding="UTF-8"?><PORT_RESPONSE><HEADER><ORIGINATOR>XMG</ORIGINATOR><DESTINAT... (16 Replies)
Discussion started by: mrn6430
16 Replies

10. Programming

How to write in other language in text/xml file by reading english text/xml file using C++?

Hello Team, I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file. Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies
scrollkeeper-devel(1)						   User Commands					     scrollkeeper-devel(1)

NAME
scrollkeeper-devel, scrollkeeper-extract, scrollkeeper-gen-seriesid, scrollkeeper-preinstall - utilities for working with OMF documents and the scrollkeeper database SYNOPSIS
scrollkeeper-extract file stylesheet output [stylesheet output...] scrollkeeper-gen-seriesid scrollkeeper-preinstall docfile omf-file1 omf-file2 DESCRIPTION
scrollkeeper-extract is used internally by scrollkeeper to convert DocBook/SGML files to Docbook/XML files if necessary, and to apply a number of transformations to the XML file to extract information from the XML file. scrollkeeper-gen-seriesid generates a globally unique series ID for an OMF file. scrollkeeper-preinstall reads omf_file1, changes the URL attribute of the identifier tag to doc_file and writes the output to omf_file2. scrollkeeper-preinstall can be used during the document installation process to point OMF files to the correct location on the target machine before registration in the scrollkeeper database. OPTIONS
None. OPERANDS
The following operands are supported: docfile Specifies the file path to the document that omf-file1 describes. file Specifies the XML file that is to be used as input for XSLT transformations. omf-file1 Specifies the OMF file that contains metadata for docfile. omf-file2 Specifies the file created by scrollkeeper-preinstall, which contains the same data as omf-file1 except that the URL attribute of the identifier tag is changed to docfile. output Specifies the file that contains the result when the preceding stylesheet has been applied to file. stylesheet Specifies an XSLT transformation to apply. EXAMPLES
Example 1: Creating a New scrollkeeper Series ID example% scrollkeeper-gen-seriesid Example 2: Extracting a TOC From a Document example% scrollkeeper-extract /path/to/xml/file.xml /usr/share/scrollkeeper/stylesheets/toc.xsl /path/to/toc.xml EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/scrollkeeper-extract The command-line executable for the scrollkeeper-extract application. /usr/bin/scrollkeeper-gen-seriesid The command-line executable for the scrollkeeper-gen-seriesid application. /usr/bin/scrollkeeper-preinstall The command-line executable for the scrollkeeper-preinstall application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-libs-devel | +-----------------------------+-----------------------------+ |Interface stability |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
scrollkeeper(1) NOTES
Written by Sander Vesik, Sun Microsystems Inc., 2003. Updated by Ghee Teo, Sun Microsystems Inc., 2007. SunOS 5.11 01 Apr 2003 scrollkeeper-devel(1)
All times are GMT -4. The time now is 09:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy