Xargs

From NovaOrdis Knowledge Base
Revision as of 00:32, 30 July 2019 by Ovidiu (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

xargs is useful to turn stdout-generated content into commands that are immediately executed.

xargs reads space/tab/newline and end-of-file delimited strings from standard input and executes the specified "utility" with the strings as argument:

... | xargs <utility>
echo "a.txt b.txt" | xargs ls -l

builds and executes:

ls -l a.txt b.txt