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