Learn Shell Scripting in 2 Weeks
I've been working on a ??-???????? Shell Scripting ???????????????? ????????, and I'm excited to share ???????????????? on my Medium website!
??Each day covers essential concepts, practical commands, and troubleshooting tips to help you become proficient in it. Whether you're a beginner or looking to refine your skills, this series will boost your Shell Scripting expertise in no time!
With given schedule, I will publish a daily article and subsequently will attach link as well to this list.
?? Week 1: Fundamentals of Shell Scripting
- What is Shell Scripting?
- Different types of Shells (Bash, Zsh, Sh, etc.)
- Basic Linux Commands for Shell Scripting:
- - File and directory management (ls, cd, mkdir, rm, etc.)
- - Viewing and manipulating files (cat, head, tail, cut, grep)
- - Process management (ps, kill, top)
- Setting up a shell scripting environment
- Creating and running a script (.sh file)
- Understanding shebang (#!/bin/bash)
- Making scripts executable (chmod +x)
- Defining variables
- Environment vs. local variables
- Using read to take user input
- Operators in Shell Scripting
- Arithmetic operators
- Comparison operators
- Logical operators
- if, elif, else
- case statement
- for loop
- while loop
- until loop
- Creating and calling functions
- Using parameters in functions
- $1, $2, $@, $#
- getopts for option parsing
- Understanding exit codes
- Using set -e, trap
领英推è
?? Week 2: File Handling & Advanced Scripting
- File test operators (-f, -d, -e, etc.)
- Reading from and writing to files
- Redirection & Piping
- > and >> operators
- Using | (pipe) to combine commands
- Using echo and logger
- Debugging with set -x
- Running scripts in the background
- nohup and jobs
Scheduling Scripts (Cron Jobs & At Command)
- Creating cron jobs
- Scheduling one-time jobs with at
- Declaring and using arrays
- String manipulation (sed, awk, cut)
- Using curl and wget
- Checking internet connectivity in scripts
- Creating backup scripts
- Automating log cleanup
- Calling Python scripts from Shell
- Using Shell scripts in DevOps (AWS CLI, Docker, Kubernetes)
Building a Real-World Project
- Example 1: Log Monitoring Script
- Example 2: System Health Check Script
- Example 3: Automated Deployment Script
Follow these all articles on Github: https://github.com/AvinashTietler/Shell-Scripting
Also Read: