in reply to Re: Replacing duplicate string
in thread Replacing duplicate string

Therein lies my problem, I've got nothing. sed will replace every occurance, grep will find me every occurance. What I need is something to get me started, that will find/replace all occurrances of the word 'priority' except the first one in each paragraph. I had even considered condensing each paragraph into one line and potentially doing it from there, but even then I would still have the same issue. I'm completely out of ideas, don't know how to even start.

Replies are listed 'Best First'.
Re^2: Replacing duplicate string
by Corion (Patriarch) on Apr 15, 2009 at 17:57 UTC

    How about remembering whether you've seen the word 'priority' already, and if so, replacing it, and not replacing it if you haven't seen it at least once already? You have to forget that you've seen 'priority' already if you see an empty line.