Date: Fri, 21 Jun 2002 10:33:03 -0400 From: Mikhail Teterin <mi+mx@aldan.algebra.com> To: Juli Mallett <jmallett@FreeBSD.ORG> Cc: arch@FreeBSD.ORG Subject: Re: feature request for xargs Message-ID: <200206211033.03948.mi%2Bmx@aldan.algebra.com> In-Reply-To: <20020620175700.A96462@FreeBSD.ORG> References: <200206200706.g5K76M514469@freefall.freebsd.org> <200206202012.17801.mi%2Bmx@aldan.algebra.com> <20020620175700.A96462@FreeBSD.ORG>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 20 June 2002 08:57 pm, Juli Mallett wrote: = > Something like ``xargs -j<N>'' which would spawn off up and wait for up = > to N processes. Currently it acts as if N was 1. Specifying 0 should = > mean no limit at all. Flag ``-j'' to resemble similar feature of make. = = Tim J. Robbins and I have been discussing this for a while, and Tim had = a patch. I'm CC'ing him, and I'm sure if he still has diffs, he'll be = glad to send them here for review I'm sure. = = I'd been hesitant on this, until we were clear on how it could and would = be used, but an arch@ review is probably enough :) Here is the usage, for which I currently use make(1). Every once in a while, I have to process a big collection of images -- scanned and/or taken with a digital camera. A scripts I have, work on one image at a time, but I have two processors, so -- with the Makefile -- I do ``make -j2''. This works good, but may be done simpler with something like echo *.JPG | xargs -n1 -j2 <script> -- without the makefile, in other words. All operations, involving many light tasks can benefit, i.e. find /some/dir \! -type d -print0 | xargs -0 -j0 rm -f (-: Does any other OS have anything similar? -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206211033.03948.mi%2Bmx>