Created
January 21, 2022 20:12
-
-
Save aGHz/1df5dbc0d9b6006d48d5db63edeb0322 to your computer and use it in GitHub Desktop.
cat + tee = catee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ -t 0 ]; then | |
cat "$@"; | |
else | |
tee "$@" <&0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment