/sortlines <N>*: Sorts lines N-N of the text file, it also echoes how long the process took.
alias sortlines {
if ($isfile($1) && $2-3) {
window -h @sort
filter -arfw $+($2,-,$3) $1 @sort
var %x = $2, %t = $ticks
while (%x <= $3) {
write $+(-l,%x) $1 $line(@sort,%x)
inc %x
}
echo -ac info * Finished sorting lines $+($2,-,$3) in $+($calc(($ticks - %t) / 1000),s!)
window -c @sort
}
}