split

    split command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.1.8
    License
    Apache-2.0
    Last updated
    15 days ago
    Downloads
    257

    #split

    Development candidate: cli/split@0.1.8, using cli/core@0.9.3. Publication is pending. Earlier exact-coordinate acceptance is recorded in the changelog.

    Split input into pieces for MoonX.

    moonx cli/split@0.1.8 [OPTION]... [FILE [PREFIX]]

    #Supported scope

    Split files or stdin by records, bytes, bounded line bytes or N-way partitions. Default is 1000 records per piece with names xaa, xab, etc.

    Filter test -s follows final targets and queries metadata without opening them. Missing/cyclic targets are false; unavailable sizes such as macOS directories produce explicit shell errors. Filters retain responsibility for handling errors and for their explicit output files.

    Filter sessions inherit the shared shell's arithmetic assignments, backticks, expanded here-documents, standard stream aliases, loop control and finite printf/test profile. See sh for grammar and API boundaries.

    #Options

    OptionDescription
    -l, --lines=NUMBERput NUMBER records in each piece (default 1000)
    -b, --bytes=SIZEput SIZE bytes in each piece
    -C, --line-bytes=SIZEput at most SIZE bytes of records in each piece
    -n, --number=CHUNKSN, K/N, l/N, l/K/N, r/N or r/K/N
    -a, --suffix-length=Nfixed suffix width; zero selects automatic width
    -d, --numeric-suffixes[=FROM]numeric suffixes
    -x, --hex-suffixes[=FROM]hexadecimal suffixes
    --additional-suffix=SUFFIXappend SUFFIX to generated names
    -e, --elide-empty-filesomit empty outputs
    --filter=COMMANDrun pure shell source per piece with FILE set
    --help / --versionShow help / package version.

    #Argument and exit-status contract

    Ordinary option/operand errors exit 1; documented capability refusals retain their own status.

    #Limitations

    • Existing named outputs are refused; failures retain completed pieces.
    • --filter uses the supported sh subset and cannot combine with selected K/N stdout output. Round-robin filters can run concurrently.
    • Some modes require writable temporary storage.

    #Examples

    moonx cli/split@0.1.8 -l 100 input.txt part- moonx cli/split@0.1.8 -b 64K -d input.bin chunk-