Bash/Shell Scripting

  1. Control Flow and Logic
    1. Conditional Statements
      1. The if Statement
        1. Basic Syntax
          1. Single Command if
            1. Multi-line if Blocks
            2. if-else Statements
              1. Basic else Clause
                1. Nested if-else
                2. if-elif-else Statements
                  1. Multiple Conditions
                    1. Complex Decision Trees
                    2. Test Commands
                      1. test Command
                        1. Square Brackets ([ ])
                          1. Double Square Brackets ([[ ]])
                          2. String Comparisons
                            1. String Equality (=, ==)
                              1. String Inequality (!=)
                                1. String Length (-z, -n)
                                  1. Lexicographic Comparison (<, >)
                                    1. Pattern Matching (=~)
                                    2. Numeric Comparisons
                                      1. Equal (-eq)
                                        1. Not Equal (-ne)
                                          1. Less Than (-lt)
                                            1. Less Than or Equal (-le)
                                              1. Greater Than (-gt)
                                                1. Greater Than or Equal (-ge)
                                                2. File and Directory Tests
                                                  1. File Existence (-e)
                                                    1. Regular File (-f)
                                                      1. Directory (-d)
                                                        1. Readable (-r)
                                                          1. Writable (-w)
                                                            1. Executable (-x)
                                                              1. File Size (-s)
                                                                1. File Age Comparisons (-nt, -ot)
                                                                2. Logical Operators
                                                                  1. AND (&&)
                                                                    1. OR (||)
                                                                      1. NOT (!)
                                                                        1. Grouping with Parentheses
                                                                      2. The case Statement
                                                                        1. Basic Syntax
                                                                          1. Pattern Matching
                                                                            1. Literal Patterns
                                                                              1. Wildcard Patterns
                                                                                1. Character Classes
                                                                                  1. Multiple Patterns
                                                                                  2. Fall-through Behavior
                                                                                    1. Default Case (*)
                                                                                      1. Complex Pattern Examples
                                                                                      2. Loops
                                                                                        1. The for Loop
                                                                                          1. List-based for Loops
                                                                                            1. Range-based for Loops
                                                                                              1. C-style for Loops
                                                                                                1. Iterating over Arrays
                                                                                                  1. Iterating over Command Output
                                                                                                    1. Iterating over Files
                                                                                                    2. The while Loop
                                                                                                      1. Basic Syntax
                                                                                                        1. Condition Testing
                                                                                                          1. Reading Files Line by Line
                                                                                                            1. Infinite Loops
                                                                                                              1. Counter-based Loops
                                                                                                              2. The until Loop
                                                                                                                1. Basic Syntax
                                                                                                                  1. Condition Testing
                                                                                                                    1. Use Cases
                                                                                                                    2. Loop Control
                                                                                                                      1. break Statement
                                                                                                                        1. continue Statement
                                                                                                                          1. Nested Loop Control
                                                                                                                          2. The select Loop
                                                                                                                            1. Creating Menus
                                                                                                                              1. User Input Handling
                                                                                                                                1. Customizing Prompts
                                                                                                                                  1. Breaking from select