Use tee with /dev/stderr:
echo "FooBar" | tee /dev/stderr
or use awk/perl/python to manually do the replication:
echo "FooBar" | awk '{print;print > "/dev/stderr"}'
echo "FooBar" | perl -pe "print STDERR, $_;"
Use tee with /dev/stderr:
echo "FooBar" | tee /dev/stderr
or use awk/perl/python to manually do the replication:
echo "FooBar" | awk '{print;print > "/dev/stderr"}'
echo "FooBar" | perl -pe "print STDERR, $_;"