using sed to replace 1 line with a multi-line variable in ksh
- by Manda
I have the following text in a file:
XXXX
NNNN
YYYY
NNNN
ZZZZ
NNNN
I want to replace the NNNN to make it look like this:
XXXX
NNNN
DUTY FORECASTER:
YYYY
NNNN
DUTY FORECASTER:
ZZZZ
NNNN
DUTY FORECASTER:
How do I use sed to replace a variable with more than one line? Is there a better way of doing this without using sed?
I have…