1

I am trying to perform process substitution within a command passed to Platform LSF via bsub.

On the worker node that I submit my job to, process substitution is not enabled because it is not a POSIX compliant feature.

I therefore need to enable the feature then submit a second process from within the bsub. I have got this working using a here-document, however, it is not without errors. The final EOF marker is not being read i.e. warning: here-document at line 4 delimited by end-of-file (wanted 'EOF')

set +o posix;
bash <<EOF
    some.program -1 <(gunzip -c some.file) -2 <(gunzip -c some.file);
EOF

submitted to bsub as single string, e.g. set +o posix;\nbash <<EOF\nsome.program -1 <(gunzip -c some.file) -2 <(gunzip -c some.file);\nEOF

Any suggestions on how to get the final EOF to be read correctly? As I say, everything runs fine, so this is just a case of tidying up the code.

1 Answer 1

2

The shell needs the EOF string to be alone in a complete line, just add a \n after it (and mybe a do nothing : after could also help) :

set +o posix;\nbash <<EOF\nsome.program -1 <(gunzip -c some.file) -2 <(gunzip -c some.file);\nEOF\n:

Note: I meant this to be a comment, but there is no enough space in a comment to write this in full.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.