Skip to content

Instantly share code, notes, and snippets.

@aGHz
Created January 21, 2022 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aGHz/1df5dbc0d9b6006d48d5db63edeb0322 to your computer and use it in GitHub Desktop.
Save aGHz/1df5dbc0d9b6006d48d5db63edeb0322 to your computer and use it in GitHub Desktop.
cat + tee = catee
#!/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