你能让一个sh
脚本调用另一个脚本吗?(显然不是。)
rwb@calleva:~/source$ ls -l
total 8
-rwxr--r-- 1 rwb rwb 50 Oct 22 03:38 caller.sh
-rwxr--r-- 1 rwb rwb 30 Oct 22 03:36 sourced.sh
rwb@calleva:~/source$ cat sourced.sh
#!/bin/sh
echo "sourced.sh"
rwb@calleva:~/source$ ./sourced.sh
sourced.sh
rwb@calleva:~/source$ cat caller.sh
#!/bin/sh
echo "caller.sh"
source ./sourced.sh
rwb@calleva:~/source$ ./caller.sh
caller.sh
./caller.sh: 5: source: Permission denied
rwb@calleva:~/source$