Description
Sort columns by the selected numeric key fields, optionally within groups and
in ascending or descending order. Large inputs are sorted in chunks using
temporary files, so the configured temporary directory must be writable and
have enough space.
Synopsis
sgsort <stdin key=GROUP key.group=0 #key.asc=true tmp="data/tempfile-sort-" max=40000 >stdout
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
in |
ifile |
stdin
|
input data |
key |
fields |
GROUP
|
sorting key |
key.group |
int |
0
|
zero-based position in the key list to use as the group key |
#key.asc |
bool |
true
|
sort #key in ascending or descending order |
tmp |
str |
data/tempfile-sort-
|
prefix for temporary chunk files |
max |
long |
40000
|
maximum number of columns per temporary chunk file |
out |
ofile |
stdout
|
output data |
Input and output
Input
input data
Output
output data