Re: [OT] Simple Shell Script (while loop)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 2009-06-03 at 02:59 -0500, John R. Dennison wrote:
> On Wed, Jun 03, 2009 at 08:44:29AM +0100, James Bensley wrote:
> 
> 	There are many ways to do this; building on your code
> 	snippet it would be:
> 
> #!/bin/bash
> find ./ -maxdepth 1 -type d | while read FOLDER
> do
> 	if [ "$FOLDER" = "./not_this_folder_oh_no!" ]; then
> 		continue
> 	fi
> 	<otherwise do some magic here>
> done
> 
> "continue" is treated as a reloop operator; and you should quote strings.
---
I'm no Bash expert but is there a real good reason "pass" would not be
used in place of continue? I'm just really currious....

JohnStanley

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux