I have a command line:
# Download and add the Nginx GPG key to verify the authenticity of the packages.
wget -O - https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg
That writes the correct data to the keyring, but sprays it to the terminal also. I tried changing sudo tee to sudo cat >, but '>' isn't part of the sudo, so I get a broken pipe.
I also tried various ways of redirecting stdout to /dev/null but still get broken pipe.
Is there a clean way to avoid tee sending the key binary code to the terminal ?