shell-script-review

Guide writing shell scripts compatible with both Bash and Zsh.

Updated Feb 9, 2026
One-click install
npx skills add https://github.com/ayazhankadessova/essential-skills --skill shell-script-review-ayazhankadessova
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-script-review
Source: https://github.com/ayazhankadessova/essential-skills/tree/main/plugins/essential-skills/skills/shell-script-review
Command: npx skills add https://github.com/ayazhankadessova/essential-skills --skill shell-script-review-ayazhankadessova

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write shell scripts that function correctly across both Bash and Zsh, avoiding common compatibility pitfalls.

Core Features & Use Cases

  • Identifies key Bash/Zsh differences: Covers array indexing, path detection, word splitting, globbing, and associative arrays.
  • Provides workarounds: Offers code snippets and best practices to ensure cross-shell compatibility.
  • Use Case: Ensure your deployment scripts run seamlessly whether your CI/CD environment uses Bash or Zsh.

Quick Start

Use the shell-script-review skill to get guidance on writing portable shell scripts.

Frequently Asked Questions about shell-script-review

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

FAQPage Schema
How do I write shell scripts compatible with both Bash and Zsh?

To write shell scripts compatible with both Bash and Zsh, you must address differences in array indexing, path detection, word splitting, and recursive globbing using specific workarounds and best practices for portability.

Why does my shell script fail when switching from Bash to Zsh?

Your shell script fails when switching from Bash to Zsh due to differences in array indexing, word splitting, and associative array syntax. Using cross-shell compatibility guidelines helps identify these pitfalls and implement proper workarounds.

What is the best way to handle array indexing differences in Bash and Zsh?

The best way to handle array indexing differences in Bash and Zsh is to use compatibility-focused reference guides that detail specific variations and offer code snippets. This ensures your arrays behave consistently across both shells.

Does associative array syntax work the same way in Bash and Zsh?

No, associative array syntax does not work the same way in Bash and Zsh. Cross-shell scripting references detail these specific differences and provide workarounds to ensure your associative arrays function correctly in both environments.

How do I ensure CI/CD deployment scripts run correctly in Zsh and Bash?

To ensure CI/CD deployment scripts run correctly in Zsh and Bash, you must apply cross-shell compatibility best practices for path detection and globbing. This prevents execution failures when the CI/CD environment switches shells.

What are the limitations of writing portable shell scripts for Bash and Zsh?

Limitations of writing portable shell scripts for Bash and Zsh include navigating differences in recursive globbing and path detection. You must carefully apply specific workarounds to avoid portability issues across different shell implementations.