0

I am really having some trouble understanding pipeline substitution. I have a program that I run with the make command that writes to stdout. What I want to be able to do is parse through the output based on criteria to multiple files.

The command I have in my script is as follows:

make | tee > (grep @@@ >> ooo_output.txt) > (grep cycles >> ooo_cpi.txt)

This seems to follow the same format that can be found in this wiki page http://mywiki.wooledge.org/ProcessSubstitution, however, when I run my script I get the following error:

./test_script: line 15: syntax error near unexpected token `('
./test_script: line 15: `   make | tee > (grep @@@ >> ooo_output.txt)'

Can someone explain what I am doing wrong? Thanks =)

2

You should write >( ) not > ( ) to get it to work properly :)

  • Still getting used to the spacing in bash scripts. Thank you! – Madhav Achar Dec 11 '14 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.