Comprehensive shell scripting examples and tutorials for beginners learning Bash scripting.
This repository contains all the example scripts from the "ABC of Shell Scripting" article series. Each script demonstrates fundamental shell scripting concepts with clear, practical examples that you can type, run, and modify.
- Introduction to Shell Scripting
- Linux Shell Types (Bourne, Bash, C Shell, Korn Shell)
- Shebang Construct and Comments
- Variables (Environment, User-defined, Arrays)
- Operators (Arithmetic, Assignment, Bitwise)
- Comparison Operators (Numeric, String, Logical, File Test)
- Conditionals (if-else, if-elif-else, case statements)
- Loops (for, while, until, loop control)
- Command-Line Arguments
- User Inputs (interactive scripts)
- Functions (parameters, return values, local/global scope)
- Linux/Unix-based operating system
- Bash shell (usually pre-installed)
- Basic understanding of command-line interface
- Clone the repository:
git clone [your-repo-url]
cd abc-of-shell-scripting- Make scripts executable:
chmod +x script-name.sh- Run a script:
./script-name.sh- Follow Along: Use these scripts while reading the article
- Type, Don't Copy: Typing scripts helps reinforce learning
- Experiment: Modify the scripts to see what happens
- Practice: Create your own variations of the examples
- ABC of Shell Scripting
- Redirections and Pipes in Shell Scripting (Coming Soon)
Suggestions and improvements are welcome! Feel free to:
- Report issues
- Suggest new examples
Lakeesha Ramanayake
- Medium
- GitHub
If you found this helpful, please star the repository!
Happy Scripting! 🚀