Bash Pipe Output

Doing Nothing to Pipe Output in Bash Command

This article introduces a method to pipe output and do nothing with it in the Bash command line language.

Shou Arisaka
1 min read
Sep 29, 2025

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.

Share this article

Shou Arisaka Sep 29, 2025

🔗 Copy Links