thank you Chris.

my goal is to use this stdout so i think i need --pipe in order to tee out
a single stream
pbzip2 -cd 25Gzipped.bz2|parallel --pipe ...

the awk program would now be like this
{if(a==$1)print $0>$1}

so i would like to tie a specific thread to just one value of a writing to $1
to avoid write contention causing corruption of output

there may be an entirely different way to achieve this attempt at dynamic
csplit which is why i am posting


On Tue, Apr 4, 2017 at 2:36 PM, Chris Penkett <[email protected]> wrote:

> Can you make your stdin pipe like this
>
> ~$ parallel "awk -v a={} -f a.awk <(cat f.txt)" ::: 2 3
> 2
> 3
>
>
>
> On 04/04/17 18:17, ed bierly wrote:
>
>> ~$ cat f.txt
>> 1
>> 2
>> 3
>>
>> ~$ cat a.awk
>> {if(a==$1)print}
>>
>> ~$ parallel 'awk -v a={} -f a.awk f.txt' ::: 2 3
>> 2
>> 3
>>
>> # how can i get the same output with stdin
>> ~$ cat f.txt | parallel 'awk -v a={} -f a.awk' ::: 2 3
>> 2
>> ~$ cat f.txt |parallel --pipe 'awk -v a={} -f a.awk' ::: 2 3
>> 2
>>
>
>
>

Reply via email to