标签:读取 命令 mys 执行 users bash 变量 dem user
1.souce:在当前bash环境下读取并执行FileName中的命令。
可以在shell启动前加载环境变量
weidiandeMacBook-Pro:myshworkspace weidian$ pwd
/Users/weidian/myshworkspace
weidiandeMacBook-Pro:myshworkspace weidian$ ls
weidiandeMacBook-Pro:myshworkspace weidian$ echo $A
weidiandeMacBook-Pro:myshworkspace weidian$ echo ‘A=1‘ > myconf.conf
weidiandeMacBook-Pro:myshworkspace weidian$ ls
myconf.conf
weidiandeMacBook-Pro:myshworkspace weidian$ cat myconf.conf
A=1
weidiandeMacBook-Pro:myshworkspace weidian$ source ./myconf.conf
weidiandeMacBook-Pro:myshworkspace weidian$ echo $A
1
标签:读取 命令 mys 执行 users bash 变量 dem user
原文地址:https://www.cnblogs.com/xiaohan970121/p/14311822.html