{
    "command": "sgsort",
    "description": "Sort columns by the selected numeric key fields, optionally within groups and\nin ascending or descending order. Large inputs are sorted in chunks using\ntemporary files, so the configured temporary directory must be writable and\nhave enough space. An explicit tmp= filename prefix takes precedence over the\nTMPDIR directory; otherwise /tmp is used. Each run creates a private scratch\ndirectory. Chunk size does not bound total memory: sorting keys and indices\nare still retained for the whole dataset.",
    "examples": [],
    "input_description": "input data",
    "notes": [],
    "output_description": "output data",
    "package": "sigclear-soig",
    "parameters": [
        {
            "choices": [],
            "default": "stdin",
            "default_known": false,
            "description": "input data",
            "name": "in",
            "required": false,
            "type": "ifile",
            "units": null
        },
        {
            "choices": [],
            "default": null,
            "default_known": false,
            "description": "numeric sorting keys; omitted keys use the group, subgroup and index\n\t   fields when available; explicit keys are required without a valid group key",
            "name": "key",
            "required": null,
            "type": "fields",
            "units": null
        },
        {
            "choices": [],
            "default": 0,
            "default_known": true,
            "description": "zero-based position in the key list to use as the group key",
            "name": "key.group",
            "required": false,
            "type": "int",
            "units": null
        },
        {
            "choices": [],
            "default": true,
            "default_known": true,
            "description": "sort #key in ascending or descending order",
            "name": "#key.asc",
            "required": null,
            "type": "bool",
            "units": null
        },
        {
            "choices": [],
            "default": null,
            "default_known": false,
            "description": "nonempty temporary filename prefix; overrides the TMPDIR directory;\n\t   if omitted, use TMPDIR when nonempty, otherwise /tmp; the parent directory\n\t   must already exist and be writable; each run creates a private directory",
            "name": "tmp",
            "required": null,
            "type": "str",
            "units": null
        },
        {
            "choices": [],
            "default": 40000,
            "default_known": true,
            "description": "maximum number of columns per temporary chunk file",
            "name": "max",
            "required": false,
            "type": "long",
            "units": null
        },
        {
            "choices": [],
            "default": "stdout",
            "default_known": false,
            "description": "output data",
            "name": "out",
            "required": false,
            "type": "ofile",
            "units": null
        }
    ],
    "related": [],
    "schema_version": 1,
    "summary": "Sort dataset columns by one or more numeric fields",
    "synopsis": "sgsort <stdin key= key.group=0 #key.asc=true tmp= max=40000 >stdout",
    "version": "1.2.2"
}