#rewrite #standard #replace #xargs #file #delimiter #basic

app zargs

A basic rewrite of xargs

2 releases

0.1.1 Nov 14, 2020
0.1.0 Nov 13, 2020

#10 in #xargs

32 downloads per month

MIT license

6KB
81 lines

zargs

A rewrite of xargs in Rust, for fun and science

Todo list

Parameters implemented from xargs:

  • "Args file" ie. "Read items from file instead of standard input."
  • "Delimiter" ie. "Input items are terminated by the specified character."
  • "Replace" ie. "Replace occurrences of a string in the initial-arguments with names read from standard input."
  • "max-procs" ie. "Run up to max-procs processes at a time; the default is 1." uses Rayon for parallelization

Not sure if I can about other parameters! Maybe I can be convinced otherwise.

Installation

cargo install zargs

Example Usage

Replacing strings, in the target command, with piped arguments

echo Vasilios | target/debug/zargs -r name echo "Hello, name!"
Hello, Vasilios!

Should work on Windows!

echo "write-output 'hello world :)'" | zargs powershell
hello world :)

Dependencies

~3MB
~48K SLoC