export UNIVER_SEARCH_ORDINARY="http://127.0.0.1/api/search/title"
export UNIVER_SEARCH_LABEL="http://127.0.0.1/api/search/common"
export UNIVER_SEARCH_VIDEO="http://127.0.0.1/api/search/result"
export UNIVER_SEARCH_UPLOAD="http://127.0.0.1/api/search/upload"
export UNIVER_TASK_MANAGER="http://127.0.0.1/api/task/manager"
I want to put these variables into the environment variables of the computer. Which file should I put in the computer?
I used to put it in / etc/profile
, but now I don"t want to put it in the etc folder. What other file can I put in and read it into?
if [[ $UNIVER_SEARCH_VIDEO == $(sed "/^UNIVER_SEARCH_VIDEO=/!d;s/.*=//" /etc/profile) ]];then
echo ${UNIVER_SEARCH_VIDEO}
else
echo ","
-sharp echo "export UNIVER_USER_LOGIN="xxx"" >> /etc/profile
grep "UNIVER_SEARCH_VIDEO" environment-variable.ini >> /etc/profile
fi
I wrote a shell instruction, but whether the variable UNIVER_SEARCH_VIDEO exists or not, it will renew the export UNIVER_USER_LOGIN=" http://127.0.0.1/api/login"
instruction