This repository contains collection of Bash scripts I created to automate DevOps tasks from basic to advanced
Focus: Fundamentals of Bash Script
hello.sh: First script with Shebang usage.variables.sh: Understanding quotes and variable assignment.greet.sh: Handling user input viaread.check_number.sh&file_check.sh: Logical conditions and if-else statements.server_check.sh: Basic service status automation.
Focus: Automation logic and script robustness.
for_loop.sh: Iterating through lists and ranges.countdown.sh: Implementing while-loops.args_demo.sh: Using Command-Line Arguments ($1,$@,$#).install_packages.sh: Automating package installation with checks.safe_script.sh: Error handling usingset -eand||.
Focus: Clean code and production-ready "Strict Mode."
functions.sh: Reusable code blocks with arguments.disk_check.sh: System health checks within functions.strict_demo.sh: Masteringset -euo pipefail.system_info.sh: A comprehensive System Info Reporter tool.
Focus: Real-world DevOps automation.
log_rotate.sh: Cleaning up old logs and compressing files.backup.sh: Creating timestamped backups with auto-deletion of old archives.maintenance.sh: Scheduled task combining rotation and backups.
Focus: Advanced text processing and report generation.
input.sh: Validates command-line arguments and verifies the existence of target log files.error_count.sh: Scans logs to calculate the total frequency of "ERROR" and "Failed" keywords.critical.sh: Extracts high-priority "CRITICAL" events with line numbers for rapid debugging.top_err.sh: Identifies the top 5 most frequent error messageslog_analyzer_report.sh: A tool to parse logs, count errors, identify critical events usinggrep/awk, and generate an automated text report.