Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

call function from separate bash script

#second.sh
func1 {
   fun="$1"
   book="$2"
   printf "func=%s,book=%s
" "$fun" "$book"
}

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

#first.sh
source ./second.sh
func1 love horror
func2 ball mystery
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #call #function #separate #bash #script
ADD COMMENT
Topic
Name
7+8 =