From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3D1B8442.BC9DC2E2@null.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: , <20020627185720.V7017@cackle.proxima.alt.za> Subject: Re: [9fans] dumb question Date: Fri, 28 Jun 2002 08:45:07 +0000 Topicbox-Message-UUID: bd268b5e-eaca-11e9-9e20-41e7f4b1d025 Lucio De Re wrote: > given no xargs or cpio, ... From time to time I toy with the idea of implementing a fully correct xargs (the Unix one doesn't quote arguments). Presumably on Plan9, "rc" should be the default interpreter for xargs. Actually xargs probably should just output its constructed commands rather than execute them; the output could be fed to "rc" but might be useful for other things. Then we'll want more control over what xargs does, e.g. options to specify how many arguments in a batch, "line length" limit, etc. Hmm, it's starting to sound like xargs might be replaced by a stream editor except for the quoting feature. Maybe what we need is an "rc-safe" quoting utility. I wonder if structural r.e.s can express a complete and correct quoting algorithm. Hmm, sounds like what we really need is a convenient way to feed macros to sam in a sed-like manner and somebody with the time and inclination to develop suitable macros and package it all up.