tldr/pages/common/xargs.md
2016-02-05 20:48:05 +00:00

265 B

xargs

Execute a command with piped arguments.

  • Main use:

{{arguments}} | xargs {{command}}

  • Handle whitespace in arguments:

{{arguments_null_terminated}} | xargs -0 {{command}}

  • Delete all files that start with 'M':

find . -name 'M*' | xargs rm