Shell Scripting 101: If Else in Shell Script
My first bash if else always took the wrong branch, the test looked right and still did the opposite. I ran the broken string test on bash 5.2.21 (Ubuntu 24.04) and watched an unquoted variable flip the result, then fixed it with quoting and [[ ]]. If else in shell script is how you branch
Shell Scripting 101: If Else in Shell Script Read More »