📜  从单独的 bash 脚本调用函数 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:58.364000             🧑  作者: Mango

代码示例1
#second.sh
func1 {
   fun="$1"
   book="$2"
   printf "func=%s,book=%s\n" "$fun" "$book"
}

func2 {
   fun2="$1"
   book2="$2"
   printf "func2=%s,book2=%s\n" "$fun2" "$book2"
}

#first.sh
source ./second.sh
func1 love horror
func2 ball mystery