|
|
|
|
|
by jschwartzi
3914 days ago
|
|
xargs is very powerful when you want to run one command with many arguments, but each argument is newline-delimited. That's basically all I use it for, and it saves me a lot of looping and subshell creation. For example, when purging backups from Mercurial after a revert: find . -name *.orig | xargs rm |
|
Because Unix filenames can contain blanks and newlines, this default behaviour is often problematic; filenames containing blanks and/or newlines are incorrectly processed by xargs.