VIP 👤
🏠 Accueil
Benchmarks
📊 Tous les Benchmarks 🦖 Dinosaure v1 🦖 Dinosaure v2 ✅ To-Do List Apps 🎨 Pages Libres 🎯 FSACB - Showcase 🌍 Traduction
Modèles
🏆 Top 10 Modèles 🆓 Modèles Gratuits 📋 Tous les Modèles ⚙️ Modes Kilo Code
Ressources
💬 Prompts IA 📖 Glossaire IA 🔗 Liens Utiles 🔌 API & Routeurs
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 "".