How do I perform sed substitution on a range of lines?
I want sed to read a text file, find a specific series of numbers, and replace them with another series of numbers.
However, I only want this to be done for a given range, for example lines 200-220. Here I can find pages on how to do this or that, rather than both.
My attempts so far are as follows:
sed -i '200,220 !/1 2 3 4 5 \replacement numbers' file
I'm probably approaching this completely wrong, but hey ho.
+3
source to share