[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using -C with --pipe is this possible?
From: |
Matt Oates (Home) |
Subject: |
Using -C with --pipe is this possible? |
Date: |
Wed, 25 Apr 2012 23:20:06 +0100 |
Hi All,
Imagine I have the file "file.tab" with the following data:
21501699 MSAFFPVISSLNPAVPSVAAP
21501700 MIGGILSCGITHTGITPLDVV
21501701 MVIAIAKYFGWPLDQLDVVTA
21501702 MKWHPDKNKNNLVEAQYRFQE
I then want to run something of the form:
parallel -C '\t' -N 1 --pipe "myprogram /dev/stdin | cat <(echo {1})
-" < file.tab | output-processing-program > results.tab
And get output like:
21501699
My programs
Awesome results go here
21501700
More results output
21501701
Again output
etc...
The idea being here that the output from myprogram is headed by the
number from the first column in my input file. Is this meant to be
possible in the 20120322 version of parallel? Or is this a feature
request, or am I just doing something stupid and parallel has a flag
to do just this? As a more general question, can you not use --pipe
and have -C and all the normal expansions for your command?
Thanks for any tips anyone can pass on. FYI for my particular problem
"myprogram" isn't mine and I can't alter it to just output this
header. I could write a wrapper but parallel could do this if its
normal functionality worked along with pipe.
Best,
Matt.
---
http://blog.mattoates.co.uk
- Using -C with --pipe is this possible?,
Matt Oates (Home) <=