Good day to all
I have a script that uses certain folders that need to be saved in order not to re-enter each time it is run, or to enter it, but only when necessary.
# Сохраняем проект в глобальный массив для использования автоматически function projectSave() { if [ ! -z $PROJECT ]; then echo "Please write a project name!" read PROJECTNAME export PROJECT=$PROJECTNAME else echo "your project is $PROJECT" fi } projectSave exit 1 The code above exports the variable to the path, but there, as I understand it, the hierarchy, and this variable is not visible a second time. What to do? Tell me who knows.