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 \”>>\”

\"Reblog

About Amit Agarwal

1 Comment on “Deleting lines from the text file”

1 Trackback on “Deleting lines from the text file”