Computing.Net > Forums > Unix > Delete Second Occurance of Pattern

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Delete Second Occurance of Pattern

Reply to Message Icon

Original Message
Name: KSHnewbie
Date: September 6, 2006 at 07:41:38 Pacific
Subject: Delete Second Occurance of Pattern
OS: win2003
CPU/Ram: n/a
Manufacturer/Model: n/a
Comment:

Hi,

I would like to know how to delete the second occurance of a pattern. For example, the pattern is:

1. First line
2. Some other sentence
3. Another couple of words

After finding pattern 1, I want to delete pattern 1, 2, and 3. I can easily substitute a space after finding pattern 1 and 2. My problem is that there are other patterns that are the same as pattern 3. I want to delete only the second occurance of pattern 3.


Report Offensive Message For Removal


Response Number 1
Name: lchi2000g
Date: September 12, 2006 at 10:46:08 Pacific
Reply: (edit)

Tried so hard, but still don't understand what your question is.

Luke Chi


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 2 Days.
Discuss in The Lounge
Poll History




Data Recovery Software