AFAICT, you're trying to feed the external program's stdin through a here-doc, which looks quite hopeless to me. Read what the Good Cookbook has to say about accessing stdin, stdout, and stderr of another process (recipe 16.9, pp. 639-641).
Update: I guess it was not so hopeless after all. :-/
the lowliest monk
In reply to Re^3: Capturing STDERR from a piped open
by tlm
in thread Capturing STDERR from a piped open
by McDarren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |