This article introduces a method to pipe output and do nothing with it in the Bash command line language.
yuis ASUS /mnt/c/pg$ echo y | :
yuis ASUS /mnt/c/pg$ echo y | tee
y
bash - Pipe that does nothing - Stack Overflow
Usage example:
xserv 2>/dev/null <<'EOT' | eval "${1:-tee}"
If there’s an argument, pipe it through eval, otherwise return without processing.