I need to take the output from one command, tee it into two different commands and save their output in variables.
So something like this:
command1 | tee >(command2 > var1) >(command3 > var2) >/dev/null
Where var1 and var2 are variables not files.
If there's another way to direct the output of a command into two different commands without using tee, I'm open to that as well. I know I can simply store the output of command1 into a variable and then echo it into command2 and command3 but I don't want to do that.