更换为SH源 [英] Replacement for source in sh

查看:163
本文介绍了更换为SH源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要设置环境变量,通常我们用

I need to set the environment variables, usually we do this by

source script.sh

但现在,我在启动过程中自动执行它,它看起来像根靴在默认情况下使用 SH 外壳。我怎么源 SH

推荐答案

的点命令'是C壳牌(和Bash)相当于

The dot command '.' is the equivalent of C Shell (and Bash) source.

. somefile

请注意,该外壳看起来使用 $ PATH 该文件,但该文件只具有可读,不可执行。

Note that the shell looks for the file using $PATH, but the file only has to be readable, not executable.

这篇关于更换为SH源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆