Thanks Guru. I ran the awk command you suggested. It certainly removes what I wanted, but it also seems to be knocking out some other parts of the file, that are essential.
I tried presenting the problem at its simplest, so as not to burden you guys with unnecessary complications, but I see that it would be better if I explained the whole thing out.
The file that I am trying to edit is a KML file. It stores GPS coordinates and is interpreted by both Google Earth and Google Maps to draw maps. The file contains many folders, some called `Waypoints', some called `Tracks', some called `Points' etc. The `Points' folder contains extra waypoints that do not form a part of the track. These only clutter up the map, so I want to nuke the entire Points folder. Sadly, the declaration of folder names is slightly clumsy in KML. A file looks like this
What I need to remove is all instances of the Points folder (there are more than one), i.e. from <Folder> to </Folder> when the name tag value is `Points'. Another way to look at it would be to remove <Folder> to </Folder> when the 1st line after <Folder> reads <name>Points</name>.
I hope this helps
Thanks in advance!
---------- Post updated at 10:07 PM ---------- Previous update was at 11:45 AM ----------
That takes out what I need, but again, it seems to delete parts of the script that it isn't meant to. For some reason, it removes the first 100 odd lines of script as well. I would post the input and output files, but they're huge. Would it help if you showed you both?
Hi,
I need help to match patterns from between two different files and extract region of strings.
inputfile1.fa
>l-WR24-1:1
GCCGGCGTCGCGGTTGCTCGCGCTCTGGGCGCTGGCGGCTGTGGCTCTACCCGGCTCCGG
GGCGGAGGGCGACGGCGGGTGGTGAGCGGCCCGGGAGGGGCCGGGCGGTGGGGTCACGTG... (4 Replies)
Hi,
I am Searching for Multiple strings in a given date range and print the Group if they exists. the below is the format:
-------------------------------------------------------------------------------------------------------------------------
ID: FIRST ID
MESSAGE: Event Message... (5 Replies)
Hi
I use sed comnand to remove occurance of one workd from a line.
However I need to removed occurance of dufferent words in ne line.
Original-1 Hi this is the END of my begining
Comand sed s/"END"/"start"/g
Output-1 Hi this is the start of my beginig
But I have more... (9 Replies)
Below am trying to separate FA-7A:1, In output file it should display 7A 1
Command am using
Gives same output as below format:
22B7 10000000c9720873 0
22B7 10000000c95d5d8b 0
22BB 10000000c97843a2 0
22BB 10000000c975adbd 0
Not showing FA ports as required format... (5 Replies)
Hi
I am having some issue editing a file in sed.
What I want to do is, in a loop pass a variable to a sed command. Sed should then search a file for a line that matches that variable, then remove all lines below until it reaches a line starting with a constant.
I have managed to write a... (14 Replies)
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
I have a 13 number string, some whitespace, and then /mp3.
I need to join them. Everyline that I need this for begins with "cd" (without the quotes).
What it looks like now:
cd media/Audio/WAVE/9781933976334 /mp3 What I want my output to be:
cd media/Audio/WAVE/9781933976334/mp3 The 13... (7 Replies)
I have the following line:
4/23/2010 0:00:38.000: Copying $$3MSYDDC02$I would like to use sed (or similiar) to remove everthing between and including $ that appears in the line so it ends up like this.
4/23/2010 0:00:38.000: Copying 3MSYDDC02I have been trying these but i'm really just... (5 Replies)
Hello,
I would like to remove a range from a file with sed or any script command that is appropriate
The section start by and finish by and I would like to keep line
Could you tell me which command I should type ?
Thanks a lot,
Franck
My input file is like this... (1 Reply)