Sha256: 66e71f1deb0fdef60d50c958b287dc6a40426b07034c9474c318a5292347eca0

Contents?: true

Size: 274 Bytes

Versions: 26

Compression:

Stored size: 274 Bytes

Contents

#!/usr/bin/env ruby

regex = /^\w+/
prefix = 'n/a'

STDIN.each_line do |line|

  if line =~ regex
    prefix = line
    next
  end

  item = line.gsub(/^\s+/, '')
  item = item.chomp

  array = []
  array.push(prefix.chomp)
  array.push(item)

  puts array.join("\t")

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ix-cli-0.0.27 bin/ix-nested-list
ix-cli-0.0.26 bin/ix-nested-list
ix-cli-0.0.25 bin/ix-nested-list
ix-cli-0.0.24 bin/ix-nested-list
ix-cli-0.0.23 bin/ix-nested-list
ix-cli-0.0.22 bin/ix-nested-list
ix-cli-0.0.21 bin/ix-nested-list
ix-cli-0.0.20 bin/ix-nested-list
ix-cli-0.0.19 bin/ix-nested-list
ix-cli-0.0.18 bin/ix-nested-list
ix-cli-0.0.17 bin/ix-nested-list
ix-cli-0.0.16 bin/ix-nested-list
ix-cli-0.0.15 bin/ix-nested-list
ix-cli-0.0.14 bin/ix-nested-list
ix-cli-0.0.13 bin/ix-nested-list
ix-cli-0.0.12 bin/ix-nested-list
ix-cli-0.0.11 bin/ix-nested-list
ix-cli-0.0.10 bin/ix-nested-list
ix-cli-0.0.9 bin/ix-nested-list
ix-cli-0.0.7 bin/ix-nested-list