Currently using the following and would like to remove the > /dev/null
part.
cat << "EOF" | sudo tee /etc/pf.conf > /dev/null
EOF
For reference, the following throws an error.
zsh: permission denied: /etc/pf.anchors/local.test
sudo cat << "EOF" > /etc/pf.anchors/local.test
echo "Hello world"
EOF