Deleting lines from the text file

Really useful for pretty big files.

sed –silent \’1,100 d\’ filename

here the command will delete the first 100 lines. You can specify whatever range you want. This will not delete the lines from the file but only display the contents on the console after deleting the 100 lines from begining.

If you want to store it in different file then you can use \”>\” or \”>>\”


2 thoughts on “Deleting lines from the text file”

This site uses Akismet to reduce spam. Learn how your comment data is processed.