SED Tricks
Using Sed to cut out lines or pull out lines
If you have a text file containing some text
And you wanted to deleted lines "3" to "7" out, you can do the following with Sed
This would leave you a new file with
Now lets say you didn't want to delete the text but wanted to pull out the lines from "3" to "7" then you could do this with sed:
This would pull out lines "3" to "7" and place in file called "test2"
Labels:
Add Comment