summaryrefslogtreecommitdiff
path: root/add-index
diff options
context:
space:
mode:
authorpks <pks@macbook.local>2020-02-19 16:19:09 +0100
committerpks <pks@macbook.local>2020-02-19 16:19:09 +0100
commit8c1c7c21f16e5800d615130831a8932a5d2b2bd2 (patch)
tree5bbae3e11b810dac500631e01342b8d15b1e92b5 /add-index
parent4bb4c4b4e35d00a4a8e96a3f1de4301f481b9cc6 (diff)
misc. scripts
Diffstat (limited to 'add-index')
-rwxr-xr-xadd-index12
1 files changed, 12 insertions, 0 deletions
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
+