heterogeneous-sort feature

This commit is contained in:
John Kerl 2015-10-21 18:26:13 -04:00
parent d513e2cd66
commit 8ecd9ddaa3
4 changed files with 26 additions and 17 deletions

View file

@ -602,8 +602,8 @@ POKI_RUN_COMMAND{{head -n 20 data/multicountdown.dat | mlr --opprint sort -f col
<p/>Any records not having all specified sort keys will appear at the end of the output, in the order they
were encountered, regardless of sort order:
POKI_RUN_COMMAND{{mlr sort -n x data/sort-het.dkvp}}HERE
POKI_RUN_COMMAND{{mlr sort -nr x data/sort-het.dkvp}}HERE
POKI_RUN_COMMAND{{mlr sort -n x data/sort-missing.dkvp}}HERE
POKI_RUN_COMMAND{{mlr sort -nr x data/sort-missing.dkvp}}HERE
<!-- ================================================================ -->
<h2>stats1</h2>

View file

@ -1,4 +1,7 @@
x=2
a=3
x=4
x=1
count=500,color=green
count=600
status=ok,count=250,hours=0.22
status=ok,count=200,hours=3.4
count=300,color=blue
count=100,color=green
count=450

View file

@ -300,10 +300,13 @@ vary, and moreover the sorted-on field name(s) don&rsquo;t need to be in the sam
<div class="pokipanel">
<pre>
$ cat data/sort-het.dkvp
x=2
a=3
x=4
x=1
count=500,color=green
count=600
status=ok,count=250,hours=0.22
status=ok,count=200,hours=3.4
count=300,color=blue
count=100,color=green
count=450
</pre>
</div>
<p/>
@ -312,10 +315,13 @@ x=1
<div class="pokipanel">
<pre>
$ mlr sort -n count data/sort-het.dkvp
x=2
a=3
x=4
x=1
count=100,color=green
status=ok,count=200,hours=3.4
status=ok,count=250,hours=0.22
count=300,color=blue
count=450
count=500,color=green
count=600
</pre>
</div>
<p/>

View file

@ -1895,12 +1895,12 @@ upsec color count
<p/>
<p/>Any records not having all specified sort keys will appear at the end of the output, in the order they
were encountered, regardless of sort order.
were encountered, regardless of sort order:
<p/>
<div class="pokipanel">
<pre>
$ mlr sort -n x data/sort-het.dkvp
$ mlr sort -n x data/sort-missing.dkvp
x=1
x=2
x=4
@ -1911,7 +1911,7 @@ a=3
<p/>
<div class="pokipanel">
<pre>
$ mlr sort -nr x data/sort-het.dkvp
$ mlr sort -nr x data/sort-missing.dkvp
x=4
x=2
x=1