From 8c1c7c21f16e5800d615130831a8932a5d2b2bd2 Mon Sep 17 00:00:00 2001 From: pks Date: Wed, 19 Feb 2020 16:19:09 +0100 Subject: misc. scripts --- add-index | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 add-index (limited to 'add-index') diff --git a/add-index b/add-index new file mode 100755 index 0000000..77a7e8d --- /dev/null +++ b/add-index @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby + +i = 0 +if ARGV.size > 0 + i = ARGV[0].to_i +end + +while line = STDIN.gets + puts "#{i}\t#{line}" + i += 1 +end + -- cgit v1.2.3