Run it with Ruby (v2.4.1):
ruby test1.rb
Or you can use PowerShell:
.\test1.ps1
Run it with Ruby (v2.4.1):
ruby test2.rb
Run it with bash with log file as argument:
chmod +x test3.sh
./test3.sh access.log
But, you can use more pretty tool, like ELK:
logstash -f logstash.conf
Ready elasticsearch with data accessible by link: Kibana UI
Username: elastic
Please, ask Julia about password.