首页 > 解决方案 > 有什么作用。/opt/pat/staging/config/VARIABLES>>/dev/null 做什么?

问题描述

这个命令在 shell 脚本中是什么意思?在shell脚本中写这个命令有什么作用??

. /opt/pat/staging/config/VARIABLES>>/dev/null

标签: bashshellunix

解决方案


获取文件以将变量加载到当前环境中,并且仅将标准输出(不是标准错误)发送到/dev/null(黑洞,如果您愿意)。

要同时发送 stdout 和 stderr 你会这样做>/dev/null 2>&1


推荐阅读