The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 09-03-2008
era era is offline Forum Advisor  
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