Using sed to extract line ranges from a text file

Using the Linux sed command to extract line ranges from very large text files.

Looking for a new simple way to plan your day? Get organized with Five.Today

I often find myself working with very large text files, which are impractical to open in an editor. If you need to extract a line-range section from a file, you can use sed:

$ sed -n 100,200p really_big_file.log

...where 100 is the starting line, and 200 is the end.

Looking for a modern PHP framework to build your new project? Please consider using the Alpha Framework

John Collins

I have been writing about web technology and software development since 2001. I am the developer of the Alpha Framework for PHP, and the Five.Today personal productivity app. I love open source, technology, and economics.