diff --git a/pages/common/xargs.md b/pages/common/xargs.md index e22d2ad6bc..cbbe3cf704 100644 --- a/pages/common/xargs.md +++ b/pages/common/xargs.md @@ -6,14 +6,14 @@ `{{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}}` -- Delete all files that start with 'M': - -`find . -name 'M*' | xargs rm` - - Insert arguments at chosen position, using '%' as the placeholder marker: -`{{arguments}} | xargs -I % {{command}} % {{extra_arguments}}` +`{{arguments}} | xargs -I '%' {{command}} % {{extra_arguments}}`