Build and execute command lines from standard input.
Synopsis
xargs [OPTION]... [COMMAND [INITIAL-ARGS]]
Description
Read items from standard input and execute a command with those items as arguments. Runs in the just-bash WASM shell inside SLICC.
Options
-I REPLSTR Replace occurrences of REPLSTR in COMMAND with input items.
-n NUM Use at most NUM arguments per command line.
-0, --null Items are terminated by a null character.
-d DELIM Items are terminated by DELIM.
-t, --verbose Print the command line before executing.
Examples
$ find . -name "*.txt" | xargs wc -l
Count lines in all .txt files.
$ echo "file1 file2" | xargs rm
Remove files listed in stdin.
$ find . -name "*.log" | xargs -I{} mv {} /tmp/logs/
Move each log file to /tmp/logs/.
Notes
Operates on the SLICC virtual filesystem (LightningFS/IndexedDB). Commands are executed via the shell.
See Also
find, grep, exec