Skip to content

Instantly share code, notes, and snippets.

@qingwang

qingwang/175349 Secret

Created March 8, 2015 09:54
Show Gist options
  • Save qingwang/fd9e9de900fbf2b97a52 to your computer and use it in GitHub Desktop.
Save qingwang/fd9e9de900fbf2b97a52 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
result = []
File.readlines('hosts.txt').each do |line|
result << line.split(' ')[0]
end
puts result.join('|')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment