def savescriptrecord # this method adds a new script file require 'fileutils' if @a_tmpscriptfilename newdata =@a_scriptfirstline.to_s + "\n #" + @a_scriptcommentline.to_s + "\n" fullnewname = @a_tmpscriptfilename.to_s + ".sh" begin # exception trapped block fileName = File.join( $shellscript_directory, fullnewname ) fd = File.open(fileName,"w") fd.print(newdata) # save the record info to the file fd.close @newdisplay=newdata # show the record info in the browser $currentscriptname = "%s" % [@a_tmpscriptfilename] # grab the new filename to create rescue @newdisplay = "\n" + "system error in createnew method" end # exception rescue end end # end of createnew