Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- def logintime(data)
- if line_to_parse == data.match(/Accepted publickey for/)
- entry = line_to_parse
- puts "#{line_to_parse}"
- end
- counter = 1
- file = File.new("logexample", "r")
- while (line = file.gets)
- logintime(line)
- counter = counter + 1
- end
- file.close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement