I have a centralized log file that I'm trying to parse out into multiple files to make it a bit more manageable.
The file contains lines looking like this
2015-04-02 16:03:13 -0500 192.168.3.3: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
2015-04-02 16:03:20 -0500 192.168.3.8: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
2015-04-02 16:03:24 -0500 192.168.4.11: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
2015-04-02 16:03:33 -0500 192.168.4.7: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
2015-04-02 16:03:34 -0500 192.168.4.8: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
2015-04-02 16:03:46 -0500 192.168.5.10: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
2015-04-02 16:03:50 -0500 192.168.5.11: shell login for 'rancid' from 192.168.50.10 on tty1 succeeded
I'd like to split the log file out so that all lines partaining to the first ip address are all in the same log file so that 192.168.3.8 has it's own file, 192.168.4.11 has it's own file etc