Accessing BASH internal variables

Hi,

Bash has an internal variable called ${PIPESTATUS} which stores the exit code of each command in the pipeline. I was trying to use this in my wdl code to capture individual exit codes in the pipeline.

test ${PIPESTATUS[0]} -eq 0

The error :

ERROR: Variable PIPESTATUS does not reference any declaration in the task (line 39, col 14):

      test ${PIPESTATUS[0]} -eq 0
             ^

Task defined here (line 16, col 6):

task BWA_Mem {

When I try to validate my code I receive an error. May I know if there is a work around to access internal bash variables in wdl?

Tagged:

Best Answer

Answers

Sign In or Register to comment.