parallel
[Top][All Lists]
Advanced

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

Re: newbie ?


From: ed bierly
Subject: Re: newbie ?
Date: Tue, 4 Apr 2017 16:22:59 -0400

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 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 <cjp64@cam.ac.uk> 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

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