Variables, If/Else & Loops in Bash – Your Script Starts Making Decisions (Ch.2)

🧠 Bash for Offensive Security — Chapter 2: Logic & Intelligence In Chapter 1 we learned to navigate, create scripts and set permissions. Now it's time to make those scripts actually think. Chapter 2 covers variables, user input, if/else conditionals, loops — the building blocks of every real-world Bash tool used in offensive security. ✅ What you'll learn: • Variables in Bash — rules, conventions, and how to use them • Taking user input with read and the -p flag • if / elif / else conditionals with real offensive security examples • Useful conditionals: -d, -f, -z, -gt, -lt flags explained • exit codes and the exit command • for loops with ranges and lists • while loops with countdown examples • Exercise 2: age_verifier.sh — input validation script • Exercise 3: factory.sh — automated log file generator 🔧 Tools used: Bash, nano, Ubuntu Terminal ⚠️ DISCLAIMER: Educational and ethical hacking purposes only. #BashScripting #BashLoops #IfElseBash #OffensiveSecurity #EthicalHacking #LinuxForHackers #BashVariables #CyberSecurityTutorial #BashConditionals #HackingForBeginners

Linux File System, Permissions & Your First Bash Script – Offensive Security Ch.1
▶︎

Linux File System, Permissions & Your First Bash Script – Offensive Security Ch.1

grep, sed & awk Explained + Functions & Arrays in Bash – Offensive Security Ch.3
▶︎

grep, sed & awk Explained + Functions & Arrays in Bash – Offensive Security Ch.3

What the Armor of God Really Means When You Feel Too Weak to Fight (No Ads)
▶︎

What the Armor of God Really Means When You Feel Too Weak to Fight (No Ads)

Smooth Jazz & Soul R&B 24/7 – Midnight Jazz Lounge | Relaxing Instrumental Vibes
▶︎

Smooth Jazz & Soul R&B 24/7 – Midnight Jazz Lounge | Relaxing Instrumental Vibes

China’s Secret | The Most Unbelievable Megaprojects in China | 4K Travel Documentary
▶︎

China’s Secret | The Most Unbelievable Megaprojects in China | 4K Travel Documentary

How to Take User Input in Python
▶︎

How to Take User Input in Python

Nabiullina will turn up, but Putin's problems will remain. What to expect from the Central Bank a...
▶︎

Nabiullina will turn up, but Putin's problems will remain. What to expect from the Central Bank a...

Today's Holy Rosary Tuesday, June 16, 2026 | Find peace in the midst of your storms
▶︎

Today's Holy Rosary Tuesday, June 16, 2026 | Find peace in the midst of your storms

Moody Gardens Penguin Cam LIVE | Penguin Habitat Stream at the Aquarium in Galveston, Texas
▶︎

Moody Gardens Penguin Cam LIVE | Penguin Habitat Stream at the Aquarium in Galveston, Texas

How to make 3D Games in Godot
▶︎

How to make 3D Games in Godot

Abstract Black and White wave pattern| Height Map Footage| 3 hours Topographic 4k  Background
▶︎

Abstract Black and White wave pattern| Height Map Footage| 3 hours Topographic 4k Background

Automate Hacking Tasks with Cron + Bash Strict Mode & Exit Codes Explained (Ch.4)
▶︎

Automate Hacking Tasks with Cron + Bash Strict Mode & Exit Codes Explained (Ch.4)

God Says:"I JUST CONFIRMED — ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message
▶︎

God Says:"I JUST CONFIRMED — ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message

Tranquil Jazz Lakeside Ambience For Deep Relaxing | Soft Jazz Music In Outdoor Coffee Shop To Focus
▶︎

Tranquil Jazz Lakeside Ambience For Deep Relaxing | Soft Jazz Music In Outdoor Coffee Shop To Focus

TV ART SLIDESHOW 24/7 | Vintage Floral Gallery 🌼4K Framed Art Screensaver for Living Room
▶︎

TV ART SLIDESHOW 24/7 | Vintage Floral Gallery 🌼4K Framed Art Screensaver for Living Room

Instrumental Worship Guitar : Best Worship Song | Peaceful, Relaxing Instrumental Hymns on Guitar
▶︎

Instrumental Worship Guitar : Best Worship Song | Peaceful, Relaxing Instrumental Hymns on Guitar

Personal VPNs: Encryption Myths and Data Security Explained
▶︎

Personal VPNs: Encryption Myths and Data Security Explained

Andrej Karpathy: From Vibe Coding to Agentic Engineering w/ Stephanie Zhan
▶︎

Andrej Karpathy: From Vibe Coding to Agentic Engineering w/ Stephanie Zhan

PLC Troubleshooting 101.  Basic Steps to Diagnose and Fix Your Machine
▶︎

PLC Troubleshooting 101. Basic Steps to Diagnose and Fix Your Machine