Say I have something like
if [[ "$age" = "12" ]]; then
"$age" = "twelve"
fi
This still returns the number itself. How can I make it become twelve?
Your syntax for assigning a variable is wrong. You can't have whitespace around the "=" and the variable being assigned should not be expanded with "$":
age="twelve"
The following is a good guide for learning basics and bash syntax: http://mywiki.wooledge.org/BashGuide/
This ought to do it.
if [[ "$age" = "12" ]]; then
age="twelve"
fi
if [[ "$age" = "twelve" ]]; then age=12 fi