Last active
May 5, 2016 16:59
-
-
Save rxw1/3c37fb62c18d24cdec2080821aecd54c to your computer and use it in GitHub Desktop.
Read from stdin
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/ruby | |
# http://stackoverflow.com/questions/273262/best-practices-with-stdin-in-ruby | |
puts ARGF.read |
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/local/bin/zsh | |
#http://stackoverflow.com/questions/6980090/how-to-read-from-file-or-stdin-in-bash | |
cat - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment