Bash
Bash scripting, shell fundamentals, automation patterns, and common pitfalls.
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 Read a File Line By Line in Bash
Read a file line by line in Bash with while and read, loop over lines with for and mapfile, load a file into a variable, and avoid common pitfalls.

How to Concatenate Strings in Bash
Concatenate strings in Bash by placing variables side by side, appending with +=, or formatting with printf -v. Covers loops, numbers, and sh scripts.

How to Set Environment Variables in Linux
Set environment variables in Linux and Bash with export, list them with printenv, and make them permanent in ~/.bashrc, /etc/environment, or environment.d.

export Command in Linux: Set Bash Environment Variables
Use export to turn Bash shell variables into environment variables that child processes inherit, list exported variables, and make them permanent across sessions.

jobs Command in Linux: List and Manage Background Jobs
The jobs command lists background and suspended processes in the current shell session. This guide covers syntax, options, job specifications, and practical examples.

bc Command in Linux: Command-Line Calculator
Use bc for arbitrary-precision math on the Linux command line, with examples covering scale, functions, base conversion, and use inside shell scripts.

type Command in Linux: Show Command Type and Location
Check how Bash resolves a name with type: alias, function, builtin, keyword, or file on disk. Covers -t, -a, -p, -P, and where Zsh and dash differ.

pushd and popd Commands in Linux: Navigate Directories with a Stack
Save directories to a stack with pushd, return with popd, and jump between them in Bash. Covers dirs, stack rotation, ~N shortcuts, quiet use in scripts, and common errors.

How to Compare Strings in Bash
Bash string comparison using equal, not equal, regex, and pattern matching operators. Includes examples for empty strings, case-insensitive matching, and substrings.

Bash Heredoc: Complete Guide with Examples
Bash heredoc lets you pass multi-line text directly to a command inside a shell script. This guide covers syntax, variable expansion, indentation with <<-, SSH usage, and common mistakes.

Bash Functions
How to define and use Bash functions, pass arguments, return values, and apply best practices for writing cleaner and more maintainable scripts.

Bash Comparison Operators: Equal, Not Equal, Greater Than
Compare numbers and strings in Bash with -eq, -ne, -gt, == and !=. Covers not equal checks, greater-than tests, and when to use [ ], [[ ]], or (( )).

Bash Strict Mode: set -euo pipefail Explained
A practical guide to Bash strict mode: how set -e, set -u, set -o pipefail, and IFS change script behavior, why they catch silent failures, and when to turn them off.

Bash if, elif, and else Statements: Syntax and Examples
Write Bash conditionals with if, if else, and elif blocks. Covers test operators, file checks, commands as conditions, && and || chains, and one-line if syntax.

Bash Pattern Matching: =~ Operator and Regular Expressions
Match strings in Bash with globs, extglob, and the =~ regex operator. Use anchors, quoting, and BASH_REMATCH to test input and capture groups.

What Is /dev/null in Linux
The Linux /dev/null device discards anything written to it and returns EOF when read. This guide shows how to silence stdout, stderr, cron output, and empty files.



