mirror of https://github.com/CrimsonTome/tldr.git
xargs: add example as discussed in #878
Also moved the concrete example to the end.waldyrious/alt-syntax
parent
eb1f864263
commit
f26d5164ae
|
@ -10,10 +10,14 @@
|
||||||
|
|
||||||
`{{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}}`
|
||||||
|
|
||||||
|
- Use the output of one command as arguments to another command:
|
||||||
|
|
||||||
|
`{{command1}} | xargs {{command2}}`
|
||||||
|
|
||||||
|
- Specific example: delete all files that start with 'M':
|
||||||
|
|
||||||
|
`find . -name 'M*' | xargs rm`
|
||||||
|
|
Loading…
Reference in New Issue