Refactor your second.sh
script like this:
func1 {
fun="$1"
book="$2"
printf "func=%s,book=%s
" "$fun" "$book"
}
func2 {
fun2="$1"
book2="$2"
printf "func2=%s,book2=%s
" "$fun2" "$book2"
}
And then call these functions from script first.sh
like this:
source ./second.sh
func1 love horror
func2 ball mystery
OUTPUT:
func=love,book=horror
func2=ball,book2=mystery
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…