Skip to content

Omar-Elmi/Bash-Scripting-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Learning โ€“ Bash Scripting

This repository documents my hands-on journey through the learning of Bash, where I built a deep and practical foundation in Bash scripting โ€” the backbone of modern DevOps and automation workflows.


๐ŸŽฎ Bash Battle Arena โ€“ Game Mode Scripting

The Bash Battle Arena is a simulation-based CLI game created to train DevOps thinking. I completed all 15 levels, each introducing a new challenge in scripting automation:

Level Script Concept
1 level01_arena_setup.sh File creation
2 level02_loop_numbers.sh Loops
3 level03_hero_check.sh File presence conditions
4 level04_file_ops.sh Copy files, check existence
5 level05_boss1.sh Combined logic & file ops
6 level06_argument_lines.sh Count file lines by arg
7 level07_sort_txt.sh Sort files by size
8 level08_log_searcher.sh Search across .log files
9 level09_directory_monitor.sh Directory change monitoring
10 level10_boss2.sh Multi-step file handling
11 level11_disk_alert.sh Disk usage checker
12 level12_config_parser.sh Parse config files
13 level13_backup_rotator.sh Keep latest 5 backups only
14 level14_menu_script.sh Build interactive menus
15 level15_boss3_menu.sh Full menu + backups + status

โžก๏ธ All scripts are in the battle_arena/ folder.


๐Ÿ› ๏ธ Extra Scripts (from Creative & Challenge Tasks)

Script Name Description
log_searcher.sh Search across all .log files recursively
monitor_directory.sh Logs file changes with timestamps
backup_rotator.sh Keeps only the 5 latest backups
config_parser.sh Reads KEY=VALUE pairs from config files
disk_usage_alert.sh Alerts if disk usage exceeds threshold

โžก๏ธ Located in the extras/ folder.


๐Ÿง  Key Takeaways

  • ๐Ÿ“ I learned how to structure reusable scripts for real-world DevOps tasks
  • ๐Ÿ” Loops, flags, and conditionals became second nature
  • โš ๏ธ I practiced error-proof scripting using set -eux and exit codes
  • ๐Ÿ“œ I learned to read logs, process files, and script backups, alerts, and monitors
  • ๐Ÿงฐ Bash became a toolbox, not just a language

๐Ÿ—ƒ๏ธ GitHub Portfolio Value

โœ… 50+ real Bash scripts
โœ… Covers all DevOps scripting building blocks
โœ… Demonstrates structure, readability, and CLI thinking
โœ… Ready to plug into Ansible, CI/CD, cron jobs, or IaC logic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages