Zsh Conditionals: if/else, File Tests & case Statements | Shell Scripting Tutorial #9

7views
00
9:50
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Learn how to make decisions in your Zsh shell scripts! In this lesson, we cover if/elif/else statements, string and numeric test operators, file tests for checking paths and permissions, and the case statement for clean pattern matching. This is Lesson 9 in our Zsh Shell Tutorial Series — perfect for beginners who want to write smarter shell scripts. 📋 What You'll Learn: • if / elif / else branching • String tests: ==, !=, -n, -z • Numeric tests: -eq, -ne, -gt, -lt • File tests: -e, -f, -d, -r, -w, -x • Logical operators: && and || • case / esac pattern matching ⏱️ Timestamps: 0:00 Introduction 0:25 if / elif / else Explained 0:55 Demo: Grade Checker Script 2:21 Test Operators Explained 2:49 Demo: String & Numeric Tests 4:22 File Tests Explained 4:50 Demo: File Checking Script 6:28 case Statement Explained 6:58 Demo: System Info Menu 8:47 Recap 9:19 Outro 💻 Source Code: https://github.com/GoCelesteAI/zsh_conditionals 🔗 Zsh Shell Tutorial Series Playlist #zsh #shellscripting #terminal #macos #conditionals #linux #codegiz
Back to tutorials

Duration

9:50

Published

February 14, 2026

Added to Codegiz

March 15, 2026

Open in YouTube