This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Split a log file into multiple files based on the dates at the start at each line. | |
For that time when logrotate did not run... | |
See the help text for more information on using this script. | |
Limitations: | |
- The date must be at the start of each line must have a fixed length. This could be made more flexible by e.g. allowing | |
the user to provide a regex to match the date. |