I have a large text file.
I need to quickly pull a bunch of lines, say from #14600 to #14700, from this file, as a separate file.
How it could be done?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
sed -n 14600,14700p filename > newfile
p : Print out the pattern space (to the standard output). This command is usually only used in conjunction with the -n command-line option.
n : If auto-print is not disabled, print the pattern space, then, regardless, replace the pattern space with the next line of input. If there is no more input then sed exits without processing any more commands.