Capture the command STDOUT to a variable and re-use it as many times as you like:
commandoutput=$commandoutput="$(command-to-run)" echo $commandoutput"$commandoutput" | grep -i errors echo $commandoutput"$commandoutput" | pbcopy If you need to capture STDERR too, then use 2>&1 at the end of the command, like so:
commandoutput=$commandoutput="$(command-to-run 2>&1)"