Question
In linux, you have file, test.txt, how do you delete all the lines between the line containing "hello" and the line containing "kevin" (where the new output is sent only to stdout, i.e. the file itself is not changed)?
sed -e '/hello/,/kevin/D' test.txt

Question
In linux, you have file, test.txt, how do you delete all the lines between the line containing "hello" and the line containing "kevin" (where the new output is sent only to stdout, i.e. the file itself is not changed)?
?

Question
In linux, you have file, test.txt, how do you delete all the lines between the line containing "hello" and the line containing "kevin" (where the new output is sent only to stdout, i.e. the file itself is not changed)?
sed -e '/hello/,/kevin/D' test.txt
If you want to change selection, open document below and click on "Move attachment"

8. Streams and sed -- The Stream Editor
ree lines before line 7. Then sed -e '3,5D' D eletes lines 3 through 5. In sed terminology, the numbers here are called addresses, which can also be regular expressions matches. To demonstrate: <span>sed -e '/Dear Henry/,/Love Jane/D' deletes all the lines starting from a line matching the regular expression Dear Henry up to a line matching Love Jane (or the end of the file if one does not exist). This behavior appli

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions