On 2021/01/21 05:17, Alejandro Colomar wrote:
This is useful for using tee to just write to a file, at the end of a pipeline, without having to redirect to /dev/null Example: echo 'foo' | sudo tee -q /etc/foo;
--- Isn't this what you want and shorter?:
echo 'foo' | sudo tq /etc/foo
ls -l /etc/foo
-rw-rw-r-- 1 root root 4 Jan 24 23:17 /etc/foo
cat tq
#!/bin/bash command tee "$@" >/dev/null It would have the advantage of working with any coreutils implementation.