The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 10-09-2008
Navatha Navatha is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 11
Need Help : while read loop

hi all,

Can you please help me with this issue ?

Code:
while [ cond1 = cond2 ] ####infinite loop 
do 
  cat file1 |while  read var1 var2
  do 
    func1 $var1 $var2
  done 
  cat file2 | while read var11 var22
  do 
    func2 $var11 $var22
  done 
done
func1 is called till all the values are read from file1
and then it picks up the func2 ....
but before all the set of values from file2 are read
and func2 is executed control is passing to func1 loop
but i want the control to go to func1 only when all the set of values from file2 are read and func2 is called ....

Warm Regards

Last edited by Franklin52; 10-09-2008 at 03:52 AM.. Reason: adding code tags