mainshell.sh
adb shell am start -a android.intent.action.MAIN -n boha.notify/.MainActivity --es primaryheader "One Two" --es primarytext "Primary text"
subshell1.sh
#!/bin/bash
export subshell1="subshell1.sh"
export subshell2="subshell2.sh"
exec ./$subshell1
exec ./$subshell2
subshell2.sh
#!/bin/bash
echo "this is subshell 1"
但是当我在Ubuntu 18.04上运行mainshell.sh时,我得到了:
#!/bin/bash
echo "this is subshell 2"
我在Stackooverflow上呆了几个小时,但又找不到任何指导,我发现的主要是运行单个子Shell。有什么想法吗?