Linux Pipelines, xargs, split, diff, and Practical Recipes Cheat Sheet/Use a placeholder in the command
Insert each item into a custom position.
Section: xargs
Use a placeholder in the command
bash
bash
printf '%s
' app1 app2 | xargs -I{} kubectl logs {}Explanation
`-I{}` substitutes each input item wherever the placeholder appears.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing xargs