Bash
Bash scripting, shell fundamentals, automation patterns, and common pitfalls.
Bash Array Operations: Length, Search, Slice, and Reverse
Practical Bash array operations for checking length, finding values, slicing, reversing, iterating, appending, prepending, and removing elements.

How to Pass Arguments to a Bash Script
This guide explains how to pass arguments to Bash scripts, read positional parameters, loop over $@, set defaults, validate input, and parse flags with getopts.

Bash source Command: Load Scripts and Variables
The Bash source command executes a file in the current shell environment, making its variables and functions available to the calling script. This guide covers syntax, common uses, and practical examples.

How to Create Bash Aliases
Bash aliases let you shorten long commands into short, memorable shortcuts. This guide covers alias syntax, persistent aliases in .bashrc, and bash functions for shortcuts that take arguments.

Bash while Loop: Syntax and Examples
Bash while loop syntax and examples: infinite loops, reading files line by line, arithmetic conditions, and the break and continue statements.

Bash: Check if String Contains Substring
Four ways to check if a string contains a substring in Bash: wildcard matching, the case statement, the regex operator, and grep. Includes examples and a Quick Reference.

Bash set Command: set -e, set -x, and set -u Explained
How the bash set builtin changes shell behavior, with practical examples of set -e to exit on errors, set -u to catch unset variables, set -x to trace execution, and pipefail.

Bash Append to File: >>, tee, and Heredoc Examples
Append text to a file in Bash using the >> operator, tee -a, and heredoc syntax. Includes examples for scripts, multiple files, and root-owned files.

Bash Arithmetic: Integer and Floating-Point Math
How to do arithmetic in Bash with the (( )) operator, $(( )) expansion, the let builtin, and bc or awk for floating-point math the shell cannot do natively.

How to Redirect stderr to stdout in Bash
Redirecting stderr and stdout in Bash using 2>&1, &>, and other operators. Covers file descriptors, appending, piping errors, and discarding output with /dev/null.

Bash String Manipulation: Substring, Replace, Length, and More
Bash string manipulation using parameter expansion: extract substrings, replace text, strip prefixes and suffixes, change case, and check for substrings with practical examples.

history Command in Linux: View and Manage Bash History
Use the history command in Linux to view, search, and clean up Bash command history. Covers expansions, HISTSIZE, HISTIGNORE, and security tips.

Bash: Write to File
Redirect output to files in Bash using the > and >> operators, tee command, and heredocs, with examples for overwriting, appending, and writing multiple lines.

Bash Best Practices: Writing Safer, Cleaner Scripts
Practical Bash best practices for writing safer and more predictable scripts, covering strict mode, quoting, error handling, and everyday patterns.

How to Run a Bash Script in Linux
Run a bash script in Linux with chmod +x, the bash interpreter, or source. Step-by-step examples with common errors and fixes.

echo Command in Linux: Print Text and Variables
How to use the echo command in Linux to print text, display variables, interpret escape sequences, and redirect output to a file. Includes colored output and common pitfalls.

sleep Command in Linux: Pause a Bash Script
How to use the sleep command in bash to pause script execution. Examples cover seconds, minutes, sleep infinity, retry loops, countdowns, and background sleeps.



