mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-13 22:51:13 +03:00
20 lines
426 B
Markdown
20 lines
426 B
Markdown
# xargs
|
|
|
|
> Execute a command with piped arguments.
|
|
|
|
- Main use:
|
|
|
|
`{{arguments}} | xargs {{command}}`
|
|
|
|
- Specific example: delete all files that start with 'M':
|
|
|
|
`find . -name 'M*' | xargs rm`
|
|
|
|
- Handle whitespace in arguments:
|
|
|
|
`{{arguments_null_terminated}} | xargs -0 {{command}}`
|
|
|
|
- Insert arguments at chosen position, using '%' as the placeholder marker:
|
|
|
|
`{{arguments}} | xargs -I '%' {{command}} % {{extra_arguments}}`
|