parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distribute files to directories instead of ssh servers?


From: Ole Tange
Subject: Re: Distribute files to directories instead of ssh servers?
Date: Thu, 6 Jun 2013 00:46:08 +0200

On Wed, Jun 5, 2013 at 11:48 PM, Ole Tange <ole@tange.dk> wrote:
> On Tue, Jun 4, 2013 at 10:50 PM, P Fudd <fink@ch.pkts.ca> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]