Your question is Shell Script for Log Cleanup. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a list of log file paths, an integer days, and a boolean dry_run, write a Python function that generates a Bash shell script as a string. The script must delete .log files older than days days, skip missing files safely, and print each action. If dry_run is true, the script should print what it would delete without removing files.
.log should be included in the generated scriptdef generate_log_cleanup_script(log_paths, days, dry_run):