Write a log rotation script Build a log rotation script. Here are the requirements:
Script should utilize variables for any directories and files used. Script should rotate /var/log/messages. Archived log files should be date+timestamped and compressed in a .tar.gz. Rotation should occur every hour on the hour. Files older than 7 hours should be deleted. Permissions for the archived files should be root rwxrw-----. Group should be root:nobody. Script should run without any errors (don't try omitting errors to STDOUT with output redirection!). Script should be only one file (only one file will be graded). Max 30 lines of code including comments. Cannot use the logrotate command, logrotated, or any log rotation software.