Name: lamos Date: September 19, 2005 at 16:18:32 Pacific Subject: How to insert string in a list? OS: Solaris CPU/Ram: 2GB
Comment:
Hi Folks,
Is there a way to insert a string of text in a database list by first locating a specific word and then inserting (or appending) a string every 3rd line after it. I've tried it with sed with limited success. The "word appears in several blocks of text; I wish to insert the string in each block on the 3rd line.
Yes, the word "word1" starts at the beginning of each block (as a reference point). From the reference point one, a string is inserted on the 4th line within the "{ }". The reason for this is that there are other blocks that start with a "word" and a number, like word12, word45, wordxy, etc. I want to target a specific word, in this case "word1".