How do I cat a range of lines?
Is there a simple commandline way to cat a file (perhaps there are some options I'm unaware of) that will show a range of lines in a text file?
I know tail and head have nice options for showing front and back ends of files, but I wanna see a range in the middle.
Example: if -s was the starting line number and -e was the ending line number, and rangecat was this made up command that worked happily according to my spec...
rangecat -s 2000 -e 2004 textfile.txt
would output to my terminal lines 2000-2004 of textfile.txt.
Last edited by raybies; 03-14-2012 at 10:18 AM.