tldr/pages/linux/xargs.md

16 lines
316 B
Markdown
Raw Normal View History

2014-03-12 21:25:30 +04:00
# xargs
> execute a command with piped arguments
- main use
`{{arguments}} | xargs {{command}}`
- handling whitespace in arguments
`{{arguments_null_terminated}} | xargs -0 {{command}}`
- example: list unneeded packages with deborphan and remove them with apt-get
`sudo deborphan | xargs sudo apt-get remove`