LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2010, 01:00 AM   #1
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Rep: Reputation: 15
Running two files at the same time


Hi,
For example, i have two bash script files namely, "a.sh" and "b.sh". Both the files contain some commands to run, how can i actually run both files at the same time, instead of running the file one by one?
 
Old 02-20-2010, 01:04 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Sounds like you would want to fork at least the first one, off into the background:

shell$ a.sh & <-- the '&' will fork the process to the background, returning execution to the next line..

# next line:

shell$ b.sh [&] < note the '&' is optional here -- use it, or not.
 
Old 02-20-2010, 01:09 AM   #3
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Original Poster
Rep: Reputation: 15
ok thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem running .o files after they are compiled from .c files in fedora core 1 Starrie Linux - Newbie 1 03-05-2009 08:24 PM
problem in mounting cdrom(audio files running but not reading data files) amit_usual Linux - Newbie 7 12-29-2007 05:52 AM
Time is running out for me. ccalvin12 Linux - Software 1 08-05-2005 07:18 AM
Running 2 OS at the same time NeoSpawn Linux - General 18 06-17-2004 05:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration