in reply to Re: Search and replace next line
in thread Search and replace next line

Won't solve the problem.

Replies are listed 'Best First'.
Re^3: Search and replace next line
by borisz (Canon) on Jan 05, 2005 at 10:23 UTC
    I replace the line following the searched line. blank or not. Thats what I understand from the question.
    And the script does NOT print both lines. Read the source again.

    UPDATE: For some reason I answered to the wrong Node! Please Ignore. Sorry to the anon monk.
    Boris
Re^3: Search and replace next line
by Thilosophy (Curate) on Jan 05, 2005 at 11:34 UTC
    Your script will only work if the wanted line is in the line immediately following the searched one.

    True. But I understood him as wanting to replace the immediately following line.

    Your script will print both the original and replaced lines.

    Really? What does it output for you? For me, it says

    test data more TheLineBefore LocalCompilerPresent=0 more stuff
    which I take to be correct. No?