#!/usr/local/bin/ruby STDERR.print "見たいファイルは?: " fn = gets.chomp if test(?r, fn) then open(fn, "r") do |f| while fline=f.gets print fline end end else STDERR.print "そんなファイル読めないよ\n" end