Bash/Shell Scripting

  1. Working with Data
    1. Text Processing Utilities
      1. grep (Global Regular Expression Print)
        1. Basic Pattern Searching
          1. Case-Insensitive Search (-i)
            1. Recursive Search (-r, -R)
              1. Line Numbers (-n)
                1. Count Matches (-c)
                  1. Invert Match (-v)
                    1. Whole Word Match (-w)
                      1. Fixed String Search (-F)
                        1. Extended Regex (-E)
                          1. Multiple Patterns (-e, -f)
                          2. sed (Stream Editor)
                            1. Basic Substitution (s///)
                              1. Global Substitution (s///g)
                                1. In-place Editing (-i)
                                  1. Delete Lines (d)
                                    1. Address Ranges
                                      1. Multiple Commands (-e)
                                        1. Script Files (-f)
                                        2. awk (Pattern Scanning and Processing)
                                          1. Basic Syntax
                                            1. Field Variables ($1, $2, $NF)
                                              1. Built-in Variables (NR, NF, FS, RS)
                                                1. Pattern Matching
                                                  1. BEGIN and END Blocks
                                                    1. Conditional Statements
                                                      1. Loops in awk
                                                        1. Functions
                                                        2. cut (Extract Columns)
                                                          1. Field Selection (-f)
                                                            1. Character Selection (-c)
                                                              1. Byte Selection (-b)
                                                                1. Delimiter Options (-d)
                                                                  1. Output Delimiter (--output-delimiter)
                                                                  2. tr (Translate Characters)
                                                                    1. Character Translation
                                                                      1. Character Deletion (-d)
                                                                        1. Character Squeezing (-s)
                                                                          1. Complement Sets (-c)
                                                                            1. Character Classes
                                                                            2. sort (Sort Lines)
                                                                              1. Alphabetical Sorting
                                                                                1. Numeric Sorting (-n)
                                                                                  1. Reverse Sorting (-r)
                                                                                    1. Field-based Sorting (-k)
                                                                                      1. Unique Sorting (-u)
                                                                                        1. Case-insensitive Sorting (-f)
                                                                                        2. uniq (Report or Omit Repeated Lines)
                                                                                          1. Remove Duplicates
                                                                                            1. Count Occurrences (-c)
                                                                                              1. Show Only Duplicates (-d)
                                                                                                1. Show Only Unique (-u)
                                                                                                  1. Skip Fields (-f)
                                                                                                  2. wc (Word, Line, Character, and Byte Count)
                                                                                                    1. Line Count (-l)
                                                                                                      1. Word Count (-w)
                                                                                                        1. Character Count (-m)
                                                                                                          1. Byte Count (-c)
                                                                                                          2. join (Join Lines Based on Common Field)
                                                                                                            1. Inner Join
                                                                                                              1. Outer Join
                                                                                                                1. Field Selection
                                                                                                                2. paste (Merge Lines)
                                                                                                                  1. Horizontal Merging
                                                                                                                    1. Custom Delimiters (-d)
                                                                                                                    2. tee (Write Output to Multiple Destinations)
                                                                                                                      1. Basic Usage
                                                                                                                        1. Append Mode (-a)
                                                                                                                      2. Regular Expressions
                                                                                                                        1. Basic Regular Expressions (BRE)
                                                                                                                          1. Literal Characters
                                                                                                                            1. Metacharacters
                                                                                                                              1. Anchors (^, $)
                                                                                                                                1. Character Classes ([])
                                                                                                                                  1. Quantifiers (*, \{n,m\})
                                                                                                                                  2. Extended Regular Expressions (ERE)
                                                                                                                                    1. Additional Metacharacters
                                                                                                                                      1. Quantifiers (+, ?, {n,m})
                                                                                                                                        1. Alternation (|)
                                                                                                                                          1. Grouping ()
                                                                                                                                          2. Character Classes
                                                                                                                                            1. Predefined Classes
                                                                                                                                              1. [:alnum:]
                                                                                                                                                1. [:alpha:]
                                                                                                                                                  1. [:digit:]
                                                                                                                                                    1. [:lower:]
                                                                                                                                                      1. [:upper:]
                                                                                                                                                        1. [:space:]
                                                                                                                                                        2. Custom Character Classes
                                                                                                                                                        3. Quantifiers
                                                                                                                                                          1. Zero or More (*)
                                                                                                                                                            1. One or More (+)
                                                                                                                                                              1. Zero or One (?)
                                                                                                                                                                1. Exact Count ({n})
                                                                                                                                                                  1. Range ({n,m})
                                                                                                                                                                  2. Anchors and Boundaries
                                                                                                                                                                    1. Line Start (^)
                                                                                                                                                                      1. Line End ($)
                                                                                                                                                                        1. Word Boundaries (\b)
                                                                                                                                                                        2. Backreferences
                                                                                                                                                                          1. Capturing Groups
                                                                                                                                                                            1. Referencing Captured Text
                                                                                                                                                                            2. Using Regex in Shell Tools
                                                                                                                                                                              1. grep with Regex
                                                                                                                                                                                1. sed with Regex
                                                                                                                                                                                  1. awk with Regex
                                                                                                                                                                                2. Arrays
                                                                                                                                                                                  1. Indexed Arrays
                                                                                                                                                                                    1. Declaration Methods
                                                                                                                                                                                      1. Assigning Individual Elements
                                                                                                                                                                                        1. Assigning Multiple Elements
                                                                                                                                                                                          1. Accessing Elements
                                                                                                                                                                                            1. Modifying Elements
                                                                                                                                                                                              1. Array Length (${#array[@]})
                                                                                                                                                                                                1. All Elements (${array[@]})
                                                                                                                                                                                                  1. Array Indices (${!array[@]})
                                                                                                                                                                                                    1. Looping Through Arrays
                                                                                                                                                                                                      1. Appending Elements
                                                                                                                                                                                                        1. Removing Elements (unset)
                                                                                                                                                                                                        2. Associative Arrays (Bash 4+)
                                                                                                                                                                                                          1. Declaration (declare -A)
                                                                                                                                                                                                            1. Assigning Key-Value Pairs
                                                                                                                                                                                                              1. Accessing Elements by Key
                                                                                                                                                                                                                1. All Keys (${!array[@]})
                                                                                                                                                                                                                  1. All Values (${array[@]})
                                                                                                                                                                                                                    1. Looping Through Keys and Values
                                                                                                                                                                                                                      1. Checking Key Existence
                                                                                                                                                                                                                      2. Array Operations
                                                                                                                                                                                                                        1. Slicing Arrays
                                                                                                                                                                                                                          1. Copying Arrays
                                                                                                                                                                                                                            1. Merging Arrays
                                                                                                                                                                                                                              1. Sorting Array Elements