Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created March 13, 2010 07:02
Show Gist options
  • Select an option

  • Save defunkt/331174 to your computer and use it in GitHub Desktop.

Select an option

Save defunkt/331174 to your computer and use it in GitHub Desktop.
Dumbed down `cat` in Ruby.
#!/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