I want to pipe stdout to multiple files, but keep stdout itself quiet. tee
is close but it prints to both the files and stdout
$ echo 'hello world' | tee aa bb cc
hello world
This works but I would prefer something simpler if possible
$ echo 'hello world' | tee aa bb cc >/dev/null
You can also close tee stdout output by writing to /dev/full
echo 'hello world' | tee aa bb cc >/dev/full
or by closing stdout.
echo 'hello world' | tee aa bb cc >&-
Be however aware that you will get either tee: standard output: No space left on device
or tee: standard output: Bad file descriptor
warnings.
You can simply use:
echo 'hello world' | tee aa bb > cc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With