Let\'s say I have a script like the following:
useless.sh
echo \"This Is Error\" 1>&2 echo \"This Is Output\"
And I have an
{ ERROR=$(./useless.sh 2>&1 1>&$out); } {out}>&1 echo "-" echo $ERROR
Will produce:
This Is Output - This Is Error