Sha256: bb7452b7b9ca2226fcc432600ad8d40765d78dc350fa56ab199fd8af1c281754

Contents?: true

Size: 764 Bytes

Versions: 5

Compression:

Stored size: 764 Bytes

Contents

#!/usr/bin/env ruby

require 'rio'

# riocat: reads from stdin and writes it to stdout
# example use:
#   riocat < afile.txt >bfile.txt
# 
# explanation:
#
# rio(?-)
#   rio(?-): a rio that will be connected to stdin or stdout depending how it is used
#
# rio(?-)
#   rio(?-): a rio that will be connected to stdin or stdout depending how it is used
#
# <
#   <: copy operator indicating rio on left is written to and the rio on the right is read from
#
rio(?-) < ?-

#
# this could also be written
#    rio(?-) < rio(?-)
# or
#    rio(?-) > ?-
# or
#    rio(?-) > rio(?-)
#
#
# this is similar but reads the entire file before writing
#    rio(?-).print!( rio(?-).slurp )



#rio(?-).print!( rio(?-).slurp)


# DONT DO THIS:
#io = rio(?-)
#io.print!( io.slurp )

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
wishdev-rio-0.4.3.1 ex/riocat
rio-0.3.9 ex/riocat
rio-0.4.0 ex/riocat
rio-0.4.1 ex/riocat
rio-0.4.2 ex/riocat