diff options
Diffstat (limited to 'add-index')
-rwxr-xr-x | add-index | 12 |
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 + |