![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extracting text out of specific lines | krabu | Shell Programming and Scripting | 3 | 04-16-2009 06:04 PM |
| extracting text and reusing the text to rename file | JohnDS | UNIX for Dummies Questions & Answers | 7 | 02-05-2009 03:55 AM |
| Copying Text between two unique text patterns | spindoctor | UNIX for Dummies Questions & Answers | 3 | 01-16-2009 03:42 AM |
| extracting unique lines from text file | soliberus | Shell Programming and Scripting | 3 | 08-22-2008 10:18 AM |
| Extracting records with unique fields from a fixed width txt file | sitney | Shell Programming and Scripting | 8 | 02-10-2008 03:18 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Extracting Text Between Two Unique Lines
Hi all! Im trying to extract a portion of text from a file and put it into a new file. I need all the lines between <Placement> and </Placement> including the Placemark lines themselves. Is there a way to extract all instances of these and not just the first one found? I've tried using sed and awk but I cant seem to get the format right. Say the original file is called file.kml and the new one newfile.kml. If it helps its on a Solaris box.
Original File Code:
... <Placemark> ... ... ... </Placemark> ... ... <Placemark> ... ... ... </Placemark> ... Code:
<Placemark> ... ... ... </Placemark> <Placemark> ... ... ... </Placemark> |
![]() |
| Bookmarks |
| Tags |
| awk, extract, sed, solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|