Remove set.
FAV_COLOR=$1
echo "My fav color is ${FAV_COLOR}"
Or if you want to install it so that it is available for subsequent programs running in the shell:
export FAV_COLOR=$1
echo "My fav color is ${FAV_COLOR}"
The keyword is exportdescribed pretty well here .
source
share