{ "name": "xargs", "section": 1, "title": "construct argument lists and invoke utility", "synopsis": [ "xargs [OPTION]... [OPERAND]..." ], "description": "Reads stdin into argument batches and runs **`ctx.runBinCommand`** (same as the shell). Enforces stdin size, token count, batch size, and invocation limits for safety.", "options": [ { "flag": "-0, --null", "meaning": "Input items are null-terminated, not whitespace-separated" }, { "flag": "-n, --max-args", "meaning": "Up to N arguments per utility invocation (capped at 128)" } ], "keywords": [ "xargs", "bare-os", "coreutils" ], "bareOsNotes": "No host process spawn; not full POSIX xargs (no -I, -P, etc.). See src/xargs.js for limits.", "examples": [ { "caption": "pass lines as arguments", "code": "printf 'a\\nb\\n' | xargs echo" }, { "caption": "one argument per run", "code": "printf 'a\\nb\\n' | xargs -n1 echo" }, { "caption": "workaround for complex scripts", "code": "# for f in *.txt; do grep -l foo $f; done" } ] }