zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: I've committed "zargs" ...
Date: Wed, 4 Sep 2002 06:32:10 +0000	[thread overview]
Message-ID: <1020904063211.ZM5052@candle.brasslantern.com> (raw)

I got a bit carried away and implemented the entire set of options from
GNU xargs 4.1.  Rather than post the result here, I've just committed it.
I didn't write any doc for contrib.yo ... does anyone think I should?

Here's `zargs --help':

----------
Usage: zargs [options --] [input-args] [-- command [initial-args]]

If command and initial-args are omitted, "print -r --" is used.

Options:
--eof[=eof-str], -e[eof-str]
    Change the end-of-input-args string from "--" to eof-str.  If
    given as --eof=, an empty argument is the end; as --eof or -e,
    with no (or an empty) eof-str, all arguments are input-args.
--exit, -x
    Exit if the size (see --max-chars) is exceeded.
--help
    Print this summary and exit.
--interactive, -p
    Prompt before executing each command line.
--max-args=max-args, -n max-args
    Use at most max-args arguments per command line.
--max-chars=max-chars, -s max-chars
    Use at most max-chars characters per command line.
--max-lines[=max-lines], -l[max-lines]
    Use at most max-lines of the input-args per command line.
    This option is misnamed for xargs compatibility.
--max-procs=max-procs, -P max-procs
    Run up to max-procs command lines in the background at once.
--no-run-if-empty, -r
    Do nothing if there are no input arguments before the eof-str.
--null, -0
    Split each input-arg at null bytes, for xargs compatibility.
--replace[=replace-str], -i[replace-str]
    Substitute replace-str in the initial-args by each initial-arg.
    Implies --exit --max-lines=1.
--verbose, -t
    Print each command line to stderr before executing it.
--version
    Print the version number of zargs and exit.
----------

I spent much more time than I should have on getting the best --max-procs
algorithm I could come up with.  Comments welcome.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


             reply	other threads:[~2002-09-04  7:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-04  6:32 Bart Schaefer [this message]
2002-09-09 14:41 ` Occasional 'job table full or recursion limit exceeded' Felix Rosencrantz
2002-09-09 16:22   ` Bart Schaefer
2002-09-11 10:36     ` Felix Rosencrantz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020904063211.ZM5052@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).