wc

    wc command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.10
    License
    Apache-2.0
    Last updated
    14 hours ago
    Downloads
    241

    #wc

    Count lines, words and bytes through MoonX.

    #Usage

    moonx cli/wc input.txt moonx cli/wc -l first.txt second.txt printf 'hello world\n' | moonx cli/wc -w

    Default output gives line, word and byte counts. Multiple inputs include totals; specific flags select individual measurements.

    #Common options

    OptionDescription
    -l, --linesCount newline bytes.
    -w, --wordsCount whitespace-delimited words.
    -c, --bytesCount input bytes.
    -m, --charsCount characters in the selected locale profile.
    -L, --max-line-lengthReport maximum line display width.
    --helpShow help.
    --files0-from VALUERead NUL-delimited filenames; - selects stdin.
    --versionShow the version.

    Use --help for the complete option list.

    #Notes

    • With C.UTF-8, -m counts valid Unicode scalars and -L measures display cells. The C profile counts each byte as a character.
    • Reading regular-file stdin does not claim GNU physical descriptor-position alignment.

    Build from source with the MoonBit 1.0 RC1 toolchain.

    See the compatibility guide for the supported profile.

    Source Files