source /home/myEnv
結果:
sh: 1: source: not found
解法:
在 .sh 中面加上指定使用的 Shell
#!/bin/bash
StackOverflow 上的討論是說:
The source command is built into some shells. If you have a script, it should specify what shell to use on the first line, such as:#!/bin/bash
[1] source command not found in sh shell
沒有留言:
張貼留言