The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Increment nested for loop parllely
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Increment nested for loop parllely
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
09-03-2008
era
Herder of Useless Cats (On Sabbatical)
Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
A construct which works even in Bourne Classic (tm) is to run the variables in parallel in a while loop, like this:
Code:
while read var1 var2; do : stuff done <<HERE 1 4 6 7 5 8 4 0 8 1 HERE
era
View Public Profile
Visit era's homepage!
Find all posts by era
Find era's past nominations received
Find era's present nominations given