cut

    cut command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.8
    License
    Apache-2.0
    Last updated
    8 hours ago
    Downloads
    178

    #cut

    Select byte ranges or delimited fields through MoonX.

    #Usage

    moonx cli/cut -b 1-5 input.txt moonx cli/cut -d : -f 1,3 records.txt

    Read files or stdin and write selected portions of each record. Lists accept individual positions, ranges and open-ended ranges.

    #Common options

    OptionDescription
    -s, --only-delimitedSkip undelimited records in field mode.
    -d VALUE, --delimiter VALUESet the field delimiter; empty means NUL.
    -f VALUE, --fields VALUESelect fields.
    -b VALUE, --bytes VALUESelect bytes.
    -c VALUE, --characters VALUESelect characters under the C-byte profile.
    --complementInvert the selected positions.
    --output-delimiter VALUEJoin selected fields/ranges; empty means NUL.
    -z, --zero-terminatedUse NUL-delimited records.
    --helpShow help.
    --versionShow the version.

    #Notes

    • Selection is byte-oriented; character mode does not provide multibyte character slicing.

    See the compatibility guide for the supported profile.

    Source Files