如上图所示,我们希望在脚本liubohhh.sh中调用liubo.sh脚本文件
liubo.sh中命令
#!/bin/bash -l
echo '哈哈哈哈哈刘博在输出'
liubohhh.sh中命令
#!/bin/bash -l
echo 'lallaallalla'
sh liubo.sh
执行liubohhh.sh
192:pengpailiubo liubo$ sh /Users/liubo/Desktop/pengpailiubo/liubohhh.sh
lallaallalla
哈哈哈哈哈刘博在输出
192:pengpailiubo liubo$