According to "Linux: The Complete Reference 6th Edition" (pg. 44), you can pipe only STDERR using the |& redirection symbols.
I've written a pretty simple script to test this:
#!/bin/bash
echo "Normal Text."
echo "Error Text." >&2
I run this script like this:
./script.sh |& sed 's:^:\t:'
Presumably, only the lines printed to STDERR will be indented. However, it doesn't actually work like this, as I see:
Normal Text.
Error Text.
What am I doing wrong here?