Xargs
xargs
reads items from stdin, and runs a command (default echo
) on each one
- each item may either be delimited by:
- blanks (which can be protected with double or single quotes or a backslash))
- newlines
Handling blanks and newlines
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
.
- in these situations pass
-0
option, which would prevent these problems, though we need to ensure that the program which produces the input forxargs
also uses a null character as a separator
Children