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
...
<Placemark>
...
...
...
</Placemark>
...
...
<Placemark>
...
...
...
</Placemark>
...
New File
<Placemark>
...
...
...
</Placemark>
<Placemark>
...
...
...
</Placemark>
Thanks!