I have a csv file of size > 10GB and need to display 100 lines on every page with pagination.
I'm using PHP with SED to get 100 lines of the file like below
sed -n '16224,16482p;16483q' filename > newfile
In PHP,im executing SED commands like below to get range of lines
$res="sed -n '".$starting.",".$stateEnd."p;".$exitState."q' common.csv > newfile.csv 2>error.log";
$output_result = shell_exec($res);
But this is taking a long time to get a range of 100 lines from the file.
Is there any better way, fast way to read to get a range of lines in any of these langs like JAVA,PHP OR PYTHON or SHELL SCRIPT or Linux commands.
Can someone please guide me here with an example