I have long command roughly this:
$ command-outer "long command which references a file here: filename1, and another file reference here: filename2"
The files are the output of another command. So I am doing:
$ command-outer "long ... "<(command-inner "again long params")"... "\
<(command-inner "again long params")" ..."
For readability I'd like to extract the inner unnamed/anonymous pipes (the ones with <()) from the long command invocation. However I can't seem to do so; doing the following:
RESULT_FILE_DESCRIPTOR1=<(command-inner ....)
leads to the file descriptor already being closed when I actually use RESULT_FILE_DESCRIPTOR1 in the params list of command-outer
And invocating command-outer on the same line, thus:
RESULT_FILE_DESCRIPTOR1=<(command-inner ....) outer-command "long ... $RESULT_FILE_DESCRIPTOR1 ... "
gives back an empty result RESULT_FILE_DESCRIPTOR1, which is not a big surprise since a:
FOO=BAR echo $FOO
Also doesn't work.