1,885
edits
Changes
→Using a Variable's Value
echo "Hooray!"
fi
You may optionally place the variable name within curly-braces (useful if there is text immediately after the variable name):
NUMBER="12"
echo "You are in ${NUMBER}th place!"
= Adding to a Variable =
To add to a variable, assign a value to it which contains the existing value plus new data. For example, to add ":." to the end of the PATH variable:
PATH="$PATH:."
= Exporting Variables =