Does anyone know how to replace line awith line band line bon line ain a text file using sed editor?
I see how to replace a line in the template space with a line that is on hold (i.e. /^Paco/xor /^Paco/g), but what if I want to take a line starting with Pacoand replace it with a line starting with Vinh, and also take a line starting with Vinh, and replace it with the line starting with Paco?
Assume for starters that there is one line with Pacoand one line with Vinhand that the line Pacoappears before the line Vinh. Then we can move on to the general case.
David source
share