sed -n -e '10,100p' input.txt > output.txt
sed -n means don't print each line by default.
-e means execute the next argument as a sed script.
10,100p is a sed script that means starting on line 10, until line 100 (inclusive), print (
p) that line. Then the output is saved into
If your file is longer than suggested, this version (suggested in the comments) will be faster:
sed -e '1,9d;100q'
That means delete lines 1-9, quit after line 100, and print the rest. For 200 lines it's not going to matter, but for 200,000 lines the first version will still look at every line even when it's never going to print them. I prefer the first version in general for being explicit, but with a long file this will be much faster — you know your data best.
Alternatively, you can use
tail in combination:
tail -n +10 input.txt | head -n 91 > output.txt
tail -n +10 prints out the entire file starting from line 10, and
head -n 91 prints the first 91 lines of that (up to and including line 100 of the original file). It's redirected to
output.txt in the same way.