Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



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)?
Answer
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)?
Answer
?

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)?
Answer
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

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.