Shell Programming Basics With Examples
On this page
- 1. **Declaring Variables**
- 2. **Accessing Variables**
- 3. **String Operations**
- 4. **Numbers and Arithmetic Operations**
- 5. **Conditional Statements**
- 6. **Loops**
- 7. **Functions**
- 8. **Case Statements**
- 9. **Arrays**
- 10. **Reading User Input**
- 11. **Command Substitution**
- 12. **File Operations**
- 13. **Functions with Return Values**
- 14. **Using Exit Status**
- 15. **Here Documents**
- 16. **Pipes and Redirection**
- 17. **Background Jobs**
- 18. **Environment Variables**
- 19. **Traps and Signal Handling**
- 20. **Case Conversion**
- 21. **Arrays with Indexes**
- 22. **Associative Arrays (Bash 4+)**
- 23. **Date and Time**
- 24. **String Manipulation with `sed`**
- 25. **Working with JSON (jq)**
More Articles
Why you might choose AWS Parameter Store over AWS Secrets Manager
When deciding between AWS Systems Manager Parameter Store and AWS Secrets Manager, it's important to consider the nature of the data you're storing
An Introduction to StackBlitz’s WebContainers
Discover how StackBlitz’s WebContainers are transforming web development by enabling full-stack environments to run entirely in the browser.
Understanding how canvas fingerprinting works through code
Learn about canvas fingerprinting, a technique used for tracking users by leveraging the unique characteristics of their devices and browsers.
Give Claude Code A Voice
An agent that works for ten minutes has exactly two moments worth interrupting you for — it finished, or it is stuck waiting on you. Two hook events, two one-second voice notes, and about six lines of settings.json. Includes both sounds, playable here, and the details that will bite you if you wire this up carelessly.