Sheldon Xu

Shell script: 实现include

很简单, 用source

#!/bin/bash

echo "Begin to call another script..."

source /path/to/another/script.sh #其中的变量在caller中依然有效

echo "Done"

posted on 2012-06-14 15:50  Sheldon Xu  阅读(1038)  评论(0编辑  收藏  举报

导航