csplit

    csplit command for MoonX.

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

    #csplit

    Split files at line or pattern boundaries for MoonX.

    moonx cli/csplit@0.2.3 [OPTION]... FILE PATTERN...

    #Supported scope

    Split a file or stdin (-) using line numbers, /BRE/[OFFSET], %BRE%[OFFSET], {N} and {*}. Print fragment sizes by default.

    #Options

    OptionDescription
    -f, --prefix=PREFIXUse PREFIX instead of xx.
    -n, --digits=NUMBERUse at least NUMBER suffix digits (default 2).
    -b, --suffix-format=FORMATUse one d/i/u/o/x/X conversion for suffixes.
    --suppress-matchedOmit the offset-adjusted split boundary line.
    -s, --silentSuppress output byte counts.
    -q, --quietSame as --silent.
    -k, --keep-filesKeep created fragments after a split error.
    -z, --elide-empty-filesOmit empty output fragments.
    --help / --versionShow help / package version.

    #Limitations

    • Existing output paths are rejected. Windows names ending in spaces or dots are rejected.
    • Requires temporary storage for the complete input and line index. Locale-specific matching is unsupported.

    #Examples

    moonx cli/csplit@0.2.3 input.txt 10 moonx cli/csplit@0.2.3 -f part- input.txt '/^SECTION/' '{*}'

    Control

    type Control

    Output

    type Output

    Pattern

    type Pattern

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io