![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to call two programs simultaneously | vipinccmb | UNIX for Dummies Questions & Answers | 1 | 08-11-2008 02:48 AM |
| How to parse 2 files simultaneously | Awanka | Shell Programming and Scripting | 8 | 04-12-2007 09:00 PM |
| cp & mkdir simultaneously | enuenu | UNIX for Dummies Questions & Answers | 5 | 03-13-2007 05:29 AM |
| Execution of two jobs simultaneously | rinku11 | Shell Programming and Scripting | 8 | 03-15-2006 01:26 AM |
| Running 2 apaches simultaneously | sx3v1l_1n51de | SUN Solaris | 2 | 07-22-2005 11:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
run serveral loops simultaneously?
Hello everyone, say I have the following script, which contains serveral loops, if I run the script, it executes the loop one by one (after the a loop, it goes to b loop, then c, then d)
I figured I should be able to run all the loops at same time, but I don't know how, can anyone help a little bit here? thanks! for file in `ls a*`; do commanda ; done for file in `ls b*`; do commandb ; done for file in `ls c*`; do commandc ; done for file in `ls d*`; do commandd ; done |
|
||||
|
The best location for advanced topics! Special Characters Anyways, that link will show you, but here is the code: Code:
for i in 1 2 3 4 5 6 7 8 9 10 # First loop.
do
echo -n "$i "
done & # Run this loop in background.
# Will sometimes execute after second loop.
That will allow you to put the loop in the background (notice the & after done). That should work! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|