bash - 有什么作用。/opt/pat/staging/config/VARIABLES>>/dev/null 做什么?
问题描述
这个命令在 shell 脚本中是什么意思?在shell脚本中写这个命令有什么作用??
. /opt/pat/staging/config/VARIABLES>>/dev/null
解决方案
获取文件以将变量加载到当前环境中,并且仅将标准输出(不是标准错误)发送到/dev/null
(黑洞,如果您愿意)。
要同时发送 stdout 和 stderr 你会这样做>/dev/null 2>&1
。
推荐阅读
- javascript - 我需要这些脚本才能使脚本有效并且其他计算
- java - 检查散列值是否相同
- dialogflow-es - Dialogflow 帐户链接授权代码流。如何强制重新关联帐户
- python - 主题建模内存错误:如何在有大量数据时进行 gensim 主题建模
- mysql - 我无法将 mysql 服务器连接到 EC2 实例
- php - Android Studio 应用程序未与 000webhost 通信以填充数据库
- c++ - C++:为什么在使用一次后重新声明模板的通用数据类型?
- ios - 自动布局:“水平居中”似乎无法解决 UICollectionViewCell 内宽度/x 位置的不平等歧义
- swift - 在 SwiftUI 中应该如何声明 viewModel 对象?
- vb.net - 使用公共属性 VB.net 将控件绑定到 UserControl 中的 BindingSource