I'm trying to pipe a command through the output of two other commands and then merge the results of the two process substitutions. An example that gets me close is:
command | tee >(sed -rn 's/.*foo (bar).*/1/p') >(awk '{print $3}')
However, I would like to achieve the following:
- I don't need to see the input stream of the original command
- I would like to use 'paste' to merge the results
I suppose one option is to run two separate commands and put them into files, but that isn't as elegant as I would like. What is the most elegant (single liner, clearly understood) way to do this in bash?