Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- input = open('input.txt').to_a
- open('list.txt').map {|e|
- e.strip!
- ([e] + input.select {|li| li.include? e }.map {|li| li.split[0] })
- .join "\t"
- }.join("\n").tap {|e| open('output.txt', 'w') {|f| f.puts e } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement