Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

Assume I have a file with about 10000 lines.

How can I print 100 lines, starting from line 1200 to line 1300?

share|improve this question

marked as duplicate by Gnouc, slm Jun 29 at 12:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 3 down vote accepted

With awk this would be awk 'NR >= 1200 && NR <= 1300'

with sed: sed -n '1200,1300 p' FILE

with head and tail: head -n 1300 FILE | tail -n 100

so many options, so many answers on stackexchange :)

share|improve this answer
    
Awesome, thank you . –  Alireza Fallah Jun 29 at 11:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.