A structured collection of real-world Bash scripts covering networking, monitoring, logging, backup, and core shell concepts.
This repository is designed for:
- 📘 Learning Bash scripting
- 🛠️ Practicing real-world scenarios
- 🎯 Preparing for DevOps / SRE / Security interviews
.
├── backup/
│ ├── simple-backup/
│ └── incremental-backup/
│
├── fundamentals/
│ ├── ifs/
│ └── variables/
│
├── logging/
│ ├── grep-analysis/
│ ├── forensic-scan/
│ └── transaction-logs/
│
├── monitoring/
│ ├── system-status/
│ ├── disk-alert/
│ ├── database-readiness/
│ └── rate-limit/
│
├── network/
│ ├── port-scan/
│ ├── port-check/
│ ├── route-lookup/
│ ├── latency-check/
│ ├── download-speed/
│ └── netstat-cheatsheet/
│
├── process/
│ └── signal-handling/
│
├── validation/
│ ├── args-validation/
│ └── array-validation/
│
└── README.md-
✔ Structured, topic-based organization
-
✔ Each script includes:
.shexecutable fileREADME.mdwith explanation
-
✔ Covers real-world use cases
-
✔ Focus on clarity and practical learning
- Port scanning & port checks
- Route lookup
- Latency measurement
- Download speed testing
- Netstat reference
- System status checks
- Disk usage alerts
- Rate limiting logic
- Service readiness checks
- Log analysis
- Forensic evidence collection
- Audit logging
- Simple backup scripts
- Incremental backup with manifest tracking
- Argument validation
- Array-based validation
- IFS (Internal Field Separator)
- Variable scope (local vs global)
- Signal trapping and cleanup
Clone the repository:
git clone <your-repo-url>
cd <repo-name>Run any script:
bash <script-path>Example:
bash network/port-check/port-check.sh 8.8.8.8 53Each module contains:
- Practical script
- Step-by-step explanation
- Key Bash concepts
Start in this order for structured understanding:
- fundamentals/
- validation/
- network/
- monitoring/
- logging/
- process/
- backup/
- Scripts are designed for Linux environments
- Some commands may require root privileges
- Outputs may vary based on system configuration
- Add automation (cron-based execution)
- Add logging to files
- Convert scripts into reusable functions
- Integrate with cloud environments
Manoj Selvan G
Feel free to fork, improve, and experiment.