Somehow I don't find a sufficient answer to my problem, only parts of hackarounds.
I'm calling a single "chained" shell command (from a Node app), that starts a long-running update process, which it's stdout/-err should be handed over, as arguments, to the second part of the shell command (another Node app that logs into a DB).
I'd like to do something like this:
updateCommand 2>$err 1>$out ; logDBCommand --log arg err out
- Can't use >as it is only for files or file descriptors.
- Also if I use shell variables (like error=$( { updateCommand | sed 's/Output/tmp/'; } 2>&1 ); logDBCommand --log arg \"${error}.\"), I can only have stdout or both mixed into one argument.
- And I don't want to pipe, as the second command (logCommand) should run whether the first one succeeded or failed execution.
- And I don't want to cache to file, cause honestly that's missing the point and introduce another asynchronous error vector
- List item
 
    