[CentOS] [OT] Simple Shell Script (while loop)

Wed Jun 3 08:33:21 UTC 2009
JohnS <jses27 at gmail.com>

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