xargs

    xargs command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.3
    License
    Apache-2.0
    Last updated
    9 days ago
    Downloads
    114

    #xargs

    Build and execute argument batches for MoonX.

    moonx cli/xargs@0.2.3 [-0prt] [-d BYTE] [-n N] [-L N] [-s BYTES] [-P N] [-E EOF] [-I REPLACE] [COMMAND [ARG...]]

    #Supported scope

    Read items from stdin and launch commands directly, with whitespace/quote parsing, delimiter modes, replacement and bounded parallelism.

    #Options

    OptionDescription
    -0 / -d, --delimiter=BYTERead NUL-delimited / selected-byte items.
    -n, --max-args=N / -L, --max-lines=NLimit arguments / input lines per invocation.
    -s, --max-chars=BYTESLimit argument bytes; default 64 KiB.
    -E, --eof=TEXTStop at the selected logical EOF in whitespace mode.
    -r, --no-run-if-emptyDo not invoke the command for empty input.
    -I, --replace=TEXTReplace TEXT using logical input lines.
    -P NRun at most N batches concurrently.
    -t, --verbose / -p, --interactivePrint commands / confirm through a separate console.
    --show-limitsShow argument limits.
    --help / --versionShow help / package version.

    #Limitations

    • Arguments are not shell-evaluated. Non-UTF-8 argument prefixes are rejected before launch.
    • Interactive mode requires a separate confirmation channel; failure to open it returns 2 before reading stdin.
    • Process-group cancellation is unsupported; parallel output order is unspecified.

    #Examples

    printf 'one\ntwo\n' | moonx cli/xargs@0.2.3 -n 1 moonx cli/echo@0.2.3 printf 'one\000two\000' | moonx cli/xargs@0.2.3 -0 moonx cli/echo@0.2.3