def viewscript require 'fileutils' $currentscriptname = "%s" % [@a_scriptfilename] begin # exception trapped block fileName = $shellscript_directory + "/" + $currentscriptname + ".sh" fd = File.open(fileName,"r") @displayscripttext = " " while ! fd.eof? @displayscripttext = fd.read end fd.close rescue @displayscripttext = "\n" + "error" end # exception rescue end