diff template.rb @ 8:51e5f26dc81e

Add a template file for reuse
author IBBoard <dev@ibboard.co.uk>
date Thu, 07 Dec 2023 19:41:46 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/template.rb	Thu Dec 07 19:41:46 2023 +0000
@@ -0,0 +1,12 @@
+#! /usr/bin/env ruby
+
+if ARGV.length != 1
+        abort("Incorrect arguments - needs input file")
+elsif not File.exist? (ARGV[0])
+	abort("File #{ARGV[0]} did not exist")
+end
+
+file = ARGV[0]
+
+File.open(file, "r").each_line(chomp: true).…
+# Rest of algorithm here
\ No newline at end of file