topical media & game development

talk show tell print

basic-shell-03-nested-for.sh / sh



  
  # Nested for loop
  
  for i in 1 2 3 4 5 6 7 8 9 10 
  do
      echo -n "Row i: "
  
      for j in 1 2 3 4 5 6 7 8 9 10
      do
          sleep 1
          echo -n "j "        
      done
  
      echo    # Output newline    
  done
  
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.