I try to read the part of the txt-file with JS, but I cannot manage it clearly. In bash I could simply use:
head -50 file.txt | tail -10
to get lines 40-50 from my file. In JS I use jQuery.get() and it looks like this:
$.get( "file.txt", function( data ) {
alert( "Data Loaded: " + data );
});
to open the whole file. And it's ok, so I can split the data with this function:
function splitString(stringToSplit, separator) {
var splits = stringToSplit.split('
', 4);
console.log(splits);
}
But is there a way to split from the offset, so I could get lines 40-50 (for example).
Sorry for me poor explanation.