LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   running functions on the same time (bash programming) (https://www.linuxquestions.org/questions/programming-9/running-functions-on-the-same-time-bash-programming-500878/)

sharapchi 11-12-2006 11:15 AM

running functions on the same time (bash programming)
 
I want to know how can i run bash functions on the same time. For example i have two like

# bash programming

func1()
{
}

func2()
{
}

# here i want to execute them together.

func1 & #???
func2 & #???

thanks.

raskin 11-12-2006 11:55 AM

Well, be precise. If func1 and func2 spend both a long time, and you type

func1&
func2&

(exactly as you did) they will run simultaneously. You can try it by placing inside file on by typing it on console.


All times are GMT -5. The time now is 06:14 PM.