LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2006, 11:15 AM   #1
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Rep: Reputation: 15
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.
 
Old 11-12-2006, 11:55 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
time functions in a c program mbacke Programming 3 04-18-2005 02:42 PM
C Programming: Help with Pointers to Functions devinWhalen Programming 2 03-04-2005 01:00 PM
C programming HELP, ncurses window functions naomi Programming 3 02-06-2005 05:54 AM
[bash-scripting]functions + arguments hylke Programming 14 10-05-2004 01:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration