Re: Help me explain --demux

2019-02-15 Thread Achim Gratz
Ole Tange writes: > I have implemented --demux. > > I need help explaining what this is and how to use it. > > --demultiplex or --demux splits out a stream of records and give each > record to a process based on the hash value of a column. The database community would call this "sharding". Regar

Execute subshells after parallel is called

2019-02-15 Thread Clyde Jones
Hi I am not sure how to do this properly - when I pipe a command to parallel, execution of any subshells parallel's execution string happen before parallel operates on each item. How do I have parallel execute after each is called? e.g. seq 10 | parallel "echo `openssl rand -hex 6`-`openssl ran

Re: Execute subshells after parallel is called

2019-02-15 Thread Joe Sapp
Try this: seq 10 | parallel "echo \$(openssl rand -hex 6)-\$(openssl rand -hex 6) {}" or seq 10 | parallel 'echo `openssl rand -hex 6`-`openssl rand -hex 6` {}' Your shell is expanding the initial call to openssl when made within double quotes. -- Joe On Fri, Feb 15, 2019 at 4:23 PM

Re: Help me explain --demux

2019-02-15 Thread Ole Tange
On Fri, Feb 15, 2019 at 9:29 PM Achim Gratz wrote: > > Ole Tange writes: > > I have implemented --demux. > > > > I need help explaining what this is and how to use it. > > > > --demultiplex or --demux splits out a stream of records and give each > > record to a process based on the hash value of a

Re: Execute subshells after parallel is called

2019-02-15 Thread Clyde Jones
Thanks!! On Fri, Feb 15, 2019 at 1:43 PM Joe Sapp wrote: > Try this: > > seq 10 | parallel "echo \$(openssl rand -hex 6)-\$(openssl rand -hex > 6) {}" > > or > > seq 10 | parallel 'echo `openssl rand -hex 6`-`openssl rand -hex 6` {}' > > Your shell is expanding the initial call to openss