我的主目录中的 .bash_profile 文件中有一堆别名声明、函数、PATH 添加等。我还使用 PBS(扭矩)调度系统。通常,一切正常,我可以从 bash 访问我的别名。但是,当我提交工作时,我的别名没有被加载。
我想也许 .bash_profile 文件在作业开始运行时没有被加载,所以在我的作业脚本中我包含了一个~/.bash_profile
语句,我可以通过包含一个小语句来确认正在访问该文件echo Testing!
,但我的别名仍然是'工作。
这是我的 .bash_profile 的示例:
alias tester='echo this is a test'
echo File was accessed!
这是我的作业脚本 commands.sub 的示例:
tester
但是,我总是得到这个输出:
tester: command not found
File was accessed!
谁能给我一些建议以使这项工作正常进行?!谢谢!