Created
July 25, 2020 03:14
-
-
Save jesusgoku/f296d399e0eaa652bcfaf970acbae89a to your computer and use it in GitHub Desktop.
Read from stdin with bash
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 | |
# while read line; do | |
# echo "${line}" | |
# done < "${1:-/dev/stdin}" | |
# cat "${1:-/dev/stdin}" | |
# cat <&0 | |
# cat - | |
cat "${1:-/dev/stdin}" > "${2:-/dev/stdout}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment