mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:04:56 +02:00
Merge pull request #891 from tldr-pages/xargs
This commit is contained in:
commit
a84285affc
1 changed files with 5 additions and 5 deletions
|
@ -6,14 +6,14 @@
|
||||||
|
|
||||||
`{{arguments}} | xargs {{command}}`
|
`{{arguments}} | xargs {{command}}`
|
||||||
|
|
||||||
|
- Specific example: delete all files that start with 'M':
|
||||||
|
|
||||||
|
`find . -name 'M*' | xargs rm`
|
||||||
|
|
||||||
- Handle whitespace in arguments:
|
- Handle whitespace in arguments:
|
||||||
|
|
||||||
`{{arguments_null_terminated}} | xargs -0 {{command}}`
|
`{{arguments_null_terminated}} | xargs -0 {{command}}`
|
||||||
|
|
||||||
- Delete all files that start with 'M':
|
|
||||||
|
|
||||||
`find . -name 'M*' | xargs rm`
|
|
||||||
|
|
||||||
- Insert arguments at chosen position, using '%' as the placeholder marker:
|
- Insert arguments at chosen position, using '%' as the placeholder marker:
|
||||||
|
|
||||||
`{{arguments}} | xargs -I % {{command}} % {{extra_arguments}}`
|
`{{arguments}} | xargs -I '%' {{command}} % {{extra_arguments}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue