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.
Example 1:
Input: log_paths = ["/var/log/app.log", "/tmp/debug.log"], days = 7, dry_run = True
Output: A Bash script string containing a loop over both paths and echo statements instead of rm commands.
Explanation: Dry-run mode previews cleanup actions without deleting files.
Example 2:
Input: log_paths = ["/opt/service/a.log"], days = 30, dry_run = False
Output: A Bash script string that checks file age and removes the file if it is older than 30 days.
Explanation: Normal mode performs actual cleanup for old log files.
1 <= len(log_paths) <= 10^31 <= len(log_paths[i]) <= 3001 <= days <= 3650.log should be included in the generated script