Code Library
Home Submit Free Hosting Link To Us Contacts

Bash Unsetting a variable

Bash Unsetting a variable Bash Bash Unsetting a variable Download (.zip)



#!/bin/bash
# unset.sh: Unsetting a variable.

variable=hello                       # Initialized.
echo "variable = $variable"

unset variable                       # Unset.
                                     # Same effect as   variable=
echo "(unset) variable = $variable"  # $variable is null.

exit 0






Tatet