Skip to content

Latest commit

 

History

History

README.md

Why This Repository Exists

I am a C# developer, and I mostly used Windows before. Recently, I switched to a dual boot setup and started using Ubuntu Linux. Because Bash is the default shell in Linux, I decided to learn it.

I have some experience with PowerShell, but Bash is different. It uses a simple and powerful style. Many tasks in Linux can be automated with Bash. Also, Docker and other tools I want to use work better with Bash scripts.

This repo is my personal Bash learning journey. I will write notes, examples, and scripts. It helps me remember and practice. I also saw that Bash questions appear on LeetCode, so this skill is useful for both daily tasks and problem solving.

Below is the roadmap I follow.

I will continue learning and updating this repo. Each commit is one more step forward.

bash-learning/

├── README.md

├── phase1-fundamentals/
│   ├── shell-basics-and-commands/
│   │   ├── what-is-bash.md
│   │   ├── basic-commands.md           # cd, ls, pwd, mkdir, rm, cp, mv, touch, cat, nano, echo
│   │   └── help-history-tab-completion.md  # man, --help, history, tab-completion, searching command history
│   ├── scripts-and-execution/
│   │   ├── creating-sh-files.md
│   │   ├── chmod-and-running.md
│   │   ├── shebang.md
│   │   ├── script-arguments.md
│   │   └── exit-codes.md
│   ├── variables/
│   │   ├── declaration-and-usage.md
│   │   ├── quoting.md
│   │   └── environment-variables.md
│   └── conditionals-and-loops/
│       ├── if-elif-else.md
│       ├── test-conditions.md           # [ ], [[ ]]
│       ├── loops.md                      # for, while, until
│       └── break-and-continue.md

├── phase2-data-functions/
│   ├── arrays/
│   │   ├── declaring-arrays.md
│   │   ├── accessing-elements.md
│   │   └── looping-arrays.md
│   ├── associative-arrays/
│   │   ├── declare-associative-arrays.md
│   │   ├── setting-values.md
│   │   └── accessing-values.md
│   └── functions/
│       ├── declaring-functions.md
│       ├── arguments.md
│       └── returning-values.md

├── phase3-file-text/
│   ├── redirects-and-pipes/
│   │   ├── output-redirection.md       # >, >>
│   │   ├── input-redirection.md        # <
│   │   └── pipes.md                    # |
│   ├── file-reading-writing/
│   │   ├── cat-head-tail.md
│   │   ├── read-command.md
│   │   └── looping-through-file.md
│   └── string-processing/
│       ├── string-operations.md        # length, substring, replace, split
│       ├── cut.md
│       ├── awk.md
│       ├── sed.md
│       └── grep.md

├── phase4-filesystem/
│   ├── finding-files/
│   │   ├── find.md
│   │   ├── locate.md
│   │   ├── which.md
│   │   └── type.md
│   │   └── file-tests.md                # [ -f file ], [ -d dir ]
│   ├── file-permissions/
│   │   ├── chmod.md
│   │   ├── chown.md
│   │   ├── ls-l.md
│   │   └── permissions-explained.md    # rwx meaning
│   └── archive-and-compression/
│       ├── tar.md
│       ├── gzip.md
│       ├── zip.md
│       └── unzip.md

├── phase5-projects/
│   ├── project-level-scripts/
│   │   ├── backup-script.md
│   │   ├── cli-tool.md
│   │   └── sync-monitor.md
│   ├── arguments-and-help-menu/
│   │   ├── getopts.md
│   │   └── dynamic-help.md
│   └── debugging-and-best-practices/
│       ├── set-x-set-e.md
│       ├── shellcheck.md
│       └── comments-and-readability.md