Sometimes, you have a large file or input stream that is mostly sorted, which you would like to fully sort (e.g. in ascending order).
More formally, suppose, you know that for any record Rn in your stream and any records Rm such that m - n > N, Rn < Rm, where N is constant.
Now, you can sort such a stream, using csv-sort, --sliding-window=<N>:
As usual, you can sort by multiple key fields (e.g. csv-sort --sliding-window=10 --fields=a,b,c), sort block by block (e.g. csv-sort --sliding-window=10 --fields=t,block), etc.