解决办法:
1.执行脚本或者命令前先手动执行一次source,如ssh user@host "source /etc/profile; /path/test.sh"
2./etc/profile、/etc/bashrc、.bash_profile、.bashrc这几个配置文件全都配置下环境变量.
最淡的墨水也胜过最强的记忆.
解决办法:
1.执行脚本或者命令前先手动执行一次source,如ssh user@host "source /etc/profile; /path/test.sh"
2./etc/profile、/etc/bashrc、.bash_profile、.bashrc这几个配置文件全都配置下环境变量.
Be First to Comment