Created
March 13, 2010 07:02
-
-
Save defunkt/331174 to your computer and use it in GitHub Desktop.
Dumbed down `cat` in Ruby.
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 ruby | |
| # Usage: rcat [file ...] | |
| # | |
| # Reads files sequentially, writing them to the standard output. The | |
| # file operands are processed in command-line order. If file is a | |
| # single dash (`-') or absent, rcat reads from the standard input. | |
| # | |
| # Like cat(1), but dumber. | |
| puts ARGF.read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment