Monday, December 09, 2013

process substitution

syntax error near unexpected token `('

I got the error message when I used command like:

program <(zcat myfile1.gz)<(zcat myfile2.gz)

in a bash script. It works well in my terminal, but when I submit the script to cluster and it always return the error message.

Finally I got the key from Mitch's blog:

It's called process substitution for piping the stdout of multiple commands. Process substitution is not a POSIX compliant feature and so it may have to be enabled via:

set +o posix

After I set the POSIX, it works well! It seems that POSIX is not enabled on the node where the job was submitted.

No comments:

Post a Comment