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 -->
  #6 (permalink)  
Old 11-18-2006
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Quote:
Originally Posted by BOFH
2. Don't use ':' as your test statement. It works for if statements but not while statements.
Huh? What shell imposes that? The following should all be equivalent in Bourne-derived shells:

Code:
 while :; do echo WTF; done


Code:
 while true; do echo WTF; done


Code:
 while ((1)); do echo WTF; done