LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] sed question

[ILUG] sed question

Marcus Furlong furlongm at hotmail.com
Thu Aug 14 13:16:02 IST 2008


> From: info at padraigkitterick.com
> 
> Do the 'second' tags always start on a new line?

No, but I could do another substitution before this one to make that happen. Something like s/ 
> P.
> 
> Marcus Furlong wrote:
>> Hi,
>> 
>> I'm having trouble using sed to do replacements on some badly tagged
>> xml. I have a large number of files that are tagged as follows:
>> 
>> 
>> blah blah
>> hello hello
>> hello hello
>> hello hello
>> 
>> blah blah blah
>> hello hello
>> hello hello
>> 
>> The "first" tags have no closing tags at all, and may or may not have
>> text between the tag and the next tag. What I want to do is remove the
>> "first" tag and any text up to, but not including the "second" tag.
>> 
>> I've got to the following stage, but don't know how to get it to _not_
>> delete the line containing the "second" tag:
>> 
>> sed -e '> 
>> Any suggestions?
>> Thanks,

_________________________________________________________________
Tired of having no room left in your inbox? Windows Live Hotmail now gives you 5GB of FREE storage! Get your free Windows Live Hotmail account here!
http://get.live.com/mail/overview


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell