cutting a text file into multiple parts in emacs

Posted by Gaurish Telang on Stack Overflow See other posts from Stack Overflow or by Gaurish Telang
Published on 2010-12-21T07:40:07Z Indexed on 2010/12/21 7:54 UTC
Read the original article Hit count: 255

Filed under:

Hi I am using the GNU-Emacs-23 editor. I have this huge text file containing about 10,000 lines which I want to chop into multiple files. Using the mouse to select the required text to paste in another file is the really painful. Also this is prone to errors too.

If I want to divide the text file according to the line numbers into say 4 file where first file:lines 1-2500 second file:lines 2500-5000 third file :lines 5000-7500 fourth file: lines: 7500-10000

how do I do this? At the very least, is there any efficient way to copy large regions of the file just by specifying line numbers

© Stack Overflow or respective owner

Related posts about emacs