VIP 👤
🏠 Home
Benchmark
📊 Tutti i benchmark 🦖 Dinosauro v1 🦖 Dinosauro v2 ✅ App To-Do List 🎨 Pagine libere creative 🎯 FSACB - Ultimate Showcase 🌍 Benchmark traduzione
Modelli
🏆 Top 10 modelli 🆓 Modelli gratuiti 📋 Tutti i modelli ⚙️ Kilo Code
Risorse
💬 Libreria di prompt 📖 Glossario IA 🔗 Link utili 🔌 API e router IA
intermediate

Bash Variable Expansion Edge Cases

#bash #shell-scripting #linux #sysadmin

Explain nuances of unset versus empty string variables in Bash scripting.

Explain the behavioral difference in Bash between testing if a variable is unset versus testing if it is set to an empty string "". Provide a script snippet demonstrating the difference between using -z, -n, and ${var:-default} expansions when the variable holds the value "".