atom feed11 messages in org.freebsd.freebsd-archRe: feature request for xargs
FromSent OnAttachments
Mikhail TeterinJun 20, 2002 5:11 pm 
Juli MallettJun 20, 2002 5:56 pm 
Mikhail TeterinJun 21, 2002 7:32 am 
Dag-Erling SmorgravJun 21, 2002 8:08 am 
Mikhail TeterinJun 21, 2002 8:10 am 
Garance A DrosihnJun 21, 2002 8:44 am 
Mikhail TeterinJun 21, 2002 9:42 am 
Terry LambertJun 21, 2002 3:20 pm 
Mikhail TeterinJun 21, 2002 3:50 pm 
Terry LambertJun 21, 2002 4:51 pm 
Wes PetersJun 24, 2002 11:27 am 
Subject:Re: feature request for xargs
From:Mikhail Teterin (mi+@aldan.algebra.com)
Date:Jun 21, 2002 7:32:41 am
List:org.freebsd.freebsd-arch

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 majo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message