bash脚本中dot的用法
发布时间:2020-12-15 21:34:40 所属栏目:安全 来源:网络整理
导读:以下代码片段中第8行的点是什么意思,来自Mac OS X Mavericks终端中/ etc / profile的来源. 1 # System-wide .profile for sh(1) 2 3 if [ -x /usr/libexec/path_helper ]; then 4 eval `/usr/libexec/path_helper -s` 5 fi 6 7 if [ "${BASH-no}" != "no" ];
以下代码片段中第8行的点是什么意思,来自Mac OS X Mavericks终端中/ etc / profile的来源.
1 # System-wide .profile for sh(1) 2 3 if [ -x /usr/libexec/path_helper ]; then 4 eval `/usr/libexec/path_helper -s` 5 fi 6 7 if [ "${BASH-no}" != "no" ]; then 8 [ -r /etc/bashrc ] && . /etc/bashrc 9 fi 解决方法
在bash,.是另一种拼写来源的方法.所以这一行与此相同:
# System-wide .profile for sh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && source /etc/bashrc fi source将文件解释为内容包含在源命令的位置.执行它的不同之处在于它可以设置别名或定义函数或变量. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- angularjs – 为什么我不能用ng-style设置元素的高度?
- node.js – 在Docker容器中安装Web应用程序:拨打unix /va
- 当使用docker/fig运行Django dev服务器时,为什么隐藏了一些
- Docker容器具有入口变量扩展和CMD参数
- Scala Option是否与C#Nullable类型相同?
- angularjs – Angular TypeScript:$watchCollection,“con
- 推荐一套Angular2的UI模板
- 免费的响应式bootstrap管理员后台界面主题 - Charisma
- 使用ADF BC AM创建SOAP WebService
- WebService 接口的测试方法
推荐文章
站长推荐
热点阅读