On Wed, Jun 5, 2013 at 11:48 PM, Ole Tange <[email protected]> wrote: > On Tue, Jun 4, 2013 at 10:50 PM, P Fudd <[email protected]> wrote: >> Hello! >> >> I'm trying to distribute 1000 files to 7 directories. This is easy if >> you're distributing to servers using parallel and ssh. > : >> I briefly toyed with >> >> parallel 'mv {1} /data/queue-$(( ( $PARALLEL_SEQ % 7 ) + 1 ))' ::: *.msg >> >> but I was really hoping for something where I could specify the >> destinations with a wildcard. : > Another way would be to expand --xapply so that if an input source has > more values than others, then the others will cycle their values (not > really sure how easy that would be to implement). Then you would be > able to do: > > parallel --xapply mv {1} /data/queue-{2} ::: *.msg ::: 1 2 3 4 5 6 7 > > Also I am afraid if that may make --xapply less useful - maybe there > are uses where it is handy that --xapply uses an empty string if the > values run out.
That proved to be very easy to implement, so try the git version. Let see if we get any complaints about the new behavior. /Ole
