xargs: move specific example, per discussion in #891
This commit is contained in:
@@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
`{{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}}`
|
||||||
@@ -13,11 +17,3 @@
|
|||||||
- 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`
|
|
||||||
|
Reference in New Issue
Block a user