coding-bash-reference

Provides complete Bash 5.3 syntax reference for writing, reviewing, and debugging shell scripts.

1|Updated Jun 23, 2026
One-click install
npx skills add https://github.com/bitranox/bitranox-skills --skill coding-bash-reference-bitranox
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coding-bash-reference
Source: https://github.com/bitranox/bitranox-skills/tree/main/plugins/bitranox/skills/coding-bash-reference
Command: npx skills add https://github.com/bitranox/bitranox-skills --skill coding-bash-reference-bitranox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Bash has dense syntax with many edge cases - quoting rules, expansion order, parameter expansion forms, redirection variants, and subtle differences between [ ] and [[ ]] - that are easy to get wrong from memory. This Skill puts the full Bash 5.3 reference at your fingertips so scripts are written correctly the first time. ## Core Features & Use Cases - Complete syntax lookup: Covers quoting, parameter expansions, redirections, compound commands, test operators, arrays, arithmetic, traps, set/shopt options, builtins, and shell variables. - Quick-reference tables: Scannable tables for the most-used constructs (parameter expansion forms, test operators, redirection syntax, prompt escapes) plus a catalog of common mistakes like unquoted variables, subshell variable loss, and set -e exceptions. - Deep-dive reference files: Seven topic files (syntax, expansions, redirections, builtins, variables, features, job control/readline/history) loaded on demand for full detail and edge cases. - Use Case: While reviewing a deployment script, you are unsure whether ${var:-default} or ${var-default} is correct, and whether cmd | head propagates the exit status - look up the exact semantics and fix the script before shipping. ## Quick Start Ask the assistant to check or write a Bash script, for example: review this backup script for quoting and error-handling bugs using the Bash reference.

Frequently Asked Questions about coding-bash-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I look up exact Bash syntax for parameter expansion?▼

Use the parameter expansion quick-reference table covering forms like ${var:-default}, ${var#pattern}, ${var/pat/str}, and case modification operators. For full semantics including edge cases, read the functions-parameters-expansions reference file.

What is the difference between [ ] and [[ ]] in Bash?▼

[[ ]] is a Bash compound command that prevents word splitting and globbing and supports ==, =~ regex matching, and pattern matching on the right side. [ ] is the POSIX test builtin where word splitting applies and only = is portable.

Does this reference cover POSIX sh or other shells like Zsh?▼

No, it covers Bash 5.3 specifically, including features beyond POSIX such as associative arrays, coprocesses, and ${var@Q} transformations. It is not intended for POSIX-portable sh scripts or Zsh and Fish syntax.

Why does my Bash variable lose its value after a pipeline?▼

Each pipeline segment runs in a subshell, so assignments like echo x | read var do not persist. Use process substitution (read var < <(cmd)) or enable the lastpipe shopt option to keep the assignment in the current shell.

How should I validate a Bash script before committing it?▼

Run shellcheck -x script.sh to catch quoting, word-splitting, and unset-variable bugs, and bash -n script.sh to check syntax without executing. The reference also recommends shfmt for consistent formatting.

When should I use Python instead of Bash for a script?▼

Prefer Python for any real logic such as path handling, text transforms, or multi-step automation, since shell has sharp edges like leading-dash paths and pipeline exit-status loss. Reserve Bash for simple one-shot command invocations.