Using Linux you can use sed, grep, awk, head & tail, and many more through a OS Processor sampler and store its return value in a variable using a Post-processor.
http://www.unix.com/shell-programming-and-scripting/53484-how-quickly-show-nth-line-file.html Reading from windows is a bit more challenging: http://stackoverflow.com/questions/2701910/windows-batch-file-to-echo-a-specific-line-number This is the way I can remember, because was the one I used.