echo -n “myvar=${myvar:-notset}”
If myvar is null or unset then it will be set to “notset”.
Tags: bash, shell Posted in bash | 8 Comments »