I wrote this script recently for a friend in a job who
needed to output a certain percentage of a log file, but
no more and no less. This was in Linux using bash, so I
had a go at writing a solution, which you see below. Posting
this up in case it’s useful to anyone else!