sort

    sort command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.5
    License
    Apache-2.0
    Last updated
    10 hours ago
    Downloads
    100

    #sort

    Sort and merge records for MoonX.

    moonx cli/sort@0.2.5 [-bcdfghinMruVz] [-s] [-m] [-o FILE] [-R|--sort=random] [--random-source=FILE] [-k KEY] [-t CHAR] [-c|-C] [-S SIZE] [-T DIR] [--batch-size=N] [FILE...]

    #Supported scope

    Sort files or stdin using C-byte order, selected keys and numeric/month/version/random modes. Supports stable, unique, check and merge modes.

    #Options

    OptionDescription
    -r / -u / -sReverse / unique keys / stable key ties.
    -b / -d / -f / -iIgnore leading blanks / dictionary order / ASCII fold / ignore nonprinting bytes.
    -n / -g / -h / -M / -VNumeric / general numeric / human numeric / month / version order.
    -R, --random-sort / --random-source=FILERandom key order / select seed source.
    -k KEY / -t CHARSelect comparison keys / field separator.
    -zUse NUL-delimited records.
    -c, --check / -C, --check=quietCheck order with diagnostics / status only.
    -m, --mergeMerge inputs already in order.
    -o, --output=FILEWrite named output; - is a literal filename.
    -S, --buffer-size=SIZESorting budget; default 64 MiB; bare numbers use KiB.
    -T, --temporary-directory=DIRSelect temporary directories; may repeat.
    --batch-size=NMaximum merge fan-in; at least 2, capped at 16.
    --help / --versionShow help / package version.

    #Limitations

    • Locale-dependent collation is unsupported. Nonzero percentage buffer sizes are rejected; the buffer budget is not a total memory cap.
    • Merge into an existing output file is rejected. Large sorts and named merges require writable temporary storage.

    #Examples

    moonx cli/sort@0.2.5 names.txt moonx cli/sort@0.2.5 -t, -k 2 -u data.csv

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io