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 阅读(1041) 评论(0) 编辑 收藏 举报
很简单, 用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 阅读(1041) 评论(0) 编辑 收藏 举报