脚本 first (测试示例1)
first
#!/bin/bash
echo 'your are in first file'
[b]方法一:使用source[/b]
#!/bin/bash
echo 'your are in second file'
source first
[b]方法二:使用.[/b]
#!/bin/bash
echo 'your are in second file'
. first
[b]方法三:使用sh[/b]
#!/bin/bash
echo 'your are in second file'
sh first