Debian Codegraph @

unset.sh

raw symbols SCIP
1 #!/bin/bash
2 # unset.sh: Unsetting a variable.
3
4 variable=hello # Initialized.
5 echo "variable = $variable"
6
7 unset variable # Unset.
8 # In this particular context,
9 #+ same effect as: variable=
10 echo "(unset) variable = $variable" # $variable is null.
11
12 if [ -z "$variable" ] # Try a string-length test.
13 then
14 echo "\$variable has zero length."
15 fi
16
17 exit 0