Sponsored Content
Top Forums Shell Programming and Scripting Extract data between two markers Post 302452696 by rajkdutta on Sunday 12th of September 2010 08:35:57 PM
Old 09-12-2010
Extract data between two markers

Data in my jsp file is as follows:
Extract the name of all include page jsp file name
<!--- Global Nav Start -->
<jsp:include page="/includes/GlobalNav.jsp" >
<jspSmiliearam name="CMCat" value="TechProp" />
</jsp:include>
<!--- Global Nav End -->
<!-- Primary Nav Start -->
<jsp:include page="/includes/PrimaryNav.jsp" flush="true" />
<!-- Primary Nav End -->

<!-- Secondary Nav Start -->
<jsp:include page="/includes/SecondaryNav.jsp" flush="true" />
<!-- Secondary Nav End -->
<!--Language Link Start -->
<jsp:include page="/includes/LangLink.jsp" flush="true" />
<!--Language Link End -->
<!-- Main Content and Left Navigation start -->
<table width="760" bgcolor="#FFFFFF" height="22" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="151" valign="top">
<!--Left Navigation start -->
<jsp:include page="/accounts/includes/LeftNav.jsp" flush="true" />
<!-- Left Navigation End -->

My output should look like this
/includes/GlobalNav.jsp
/includes/PrimaryNav.jsp
/includes/LangLink.jsp
/accounts/includes/LeftNav.jsp

use sed or awk
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract data from file

Dear All , I am posting first time in this forum . Please ignore my mistakes . I am learning Unix and i need help to extract specific data from file . 1. I want to grep number of fails from log . The file contains "fails" word in line if test cases are failed . 2. The log contains... (20 Replies)
Discussion started by: getdpg
20 Replies

2. Shell Programming and Scripting

how to extract a data from a column?

Hi All, Consider the below column, say this is the 4th column in a file PROV_STATS:::919900546978::Nokia 6600 PROV_STATS:::919900546978::Nokia 6600 PROV_STATS:::919900546978::Nokia 6600 I wanted to extract only 919900546978 from the 4 th cloumn using unix scripting? Kindly help (8 Replies)
Discussion started by: Balaji Sukumara
8 Replies

3. UNIX for Dummies Questions & Answers

End of record markers

I have a file with thousands of 80 character records. Unfortunately, there are no end of record characters, so any normal script commands that I've tried will process the entire file as one record. I.E. If I use grep to find the record that contains some specific value, I either get nothing... (3 Replies)
Discussion started by: Dave Miller
3 Replies

4. Shell Programming and Scripting

extract data from a data matrix with filter criteria

Here is what old matrix look like, IDs X1 X2 Y1 Y2 10914061 -0.364613333 -0.362922333 0.001691 -0.450094667 10855062 0.845956333 0.860396667 0.014440333 1.483899333... (7 Replies)
Discussion started by: ssshen
7 Replies

5. Shell Programming and Scripting

how to extract the data ?

Hi, I'm trying to pick out a data field eg. from below. I need the required field as below but they are filled sometimes with weird chars like \-(. or watever. How can I accurately extract the 3rd field in shell? :confused: ID IDNO - REQUIRED FIELD ID 1447 - MAT620BR. ID 1452 -... (13 Replies)
Discussion started by: uxnoob
13 Replies

6. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

7. Shell Programming and Scripting

Extract specific data content from a long list of data

My input: Data name: ABC001 Data length: 1000 Detail info Data Direction Start_time End_time Length 1 forward 10 100 90 1 forward 15 200 185 2 reverse 50 500 450 Data name: XFG110 Data length: 100 Detail info Data Direction Start_time End_time Length 1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies

8. Shell Programming and Scripting

Extract header data from one file and combine it with data from another file

Hi, Great minds, I have some files, in fact header files, of CTD profiler, I tried a lot C programming, could not get output as I was expected, because my programming skills are very poor, finally, joined unix forum with the hope that, I may get what I want, from you people, Here I have attached... (17 Replies)
Discussion started by: nex_asp
17 Replies

9. Shell Programming and Scripting

Extract data from a file

Hello All, I have a small xml file which looks like below: <Check:defaultval Val="crash" value="crash_report_0013&#xA;generate_check_0020 generate_check_0022&#xA;&#xA;This is where the fault is."/> <Check:defaultval Val="crash" value="crash_report_1001&#xA;generate_check_1001... (9 Replies)
Discussion started by: suvendu4urs
9 Replies

10. Shell Programming and Scripting

sed substitution depending on trailing markers

I have a pattern Preceding a # hash in a string which needs to be substituted. However, the substitution value will depend on the content of the last few characters, (_ABC or _RW) of whole stream. I was thinking sed should be used but I' haven't been able to figure it out the right combo. Is sed... (4 Replies)
Discussion started by: jy6383
4 Replies
MK-AMD-MAP(8)						    BSD System Manager's Manual 					     MK-AMD-MAP(8)

NAME
mk-amd-map -- create database maps for amd(8) SYNOPSIS
mk-amd-map [-p] mapname DESCRIPTION
The mk-amd-map utility creates the database maps used by the keyed map lookups in amd(8). It reads input from the named file and outputs them to a correspondingly named hashed database. The -p option prints the map on standard output instead of generating a database. This is usually used to merge continuation lines into one physical line. SEE ALSO
amd.conf(5), amd(8) ``am-utils'' info(1) entry. Erez Zadok, Linux NFS and Automounter Administration, Sybex, 2001, ISBN 0-7821-2739-8. http://www.am-utils.org/ Amd - The 4.4 BSD Automounter. AUTHORS
Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK. Erez Zadok <ezk@cs.sunysb.edu>, Computer Science Department, Stony Brook University, New York, USA Other authors and contributors to am-utils are listed in the AUTHORS file distributed with am-utils. BSD
January 2, 2006 BSD
All times are GMT -4. The time now is 06:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy