Reputation: 1
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
Upvotes: 16
Views: 9537
Reputation: 405
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.
Upvotes: 7