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

Re: Unix-ify File Names



On Tue, Apr 17, 2007 at 03:36:26PM -0700, Mike McClain wrote:
> Frank Terbeck <ft@bewatermyfriend.org> wrote:
> 
> > >  for FILE in `ls *$1` ; do
> > 
> > Please don't teach beginners to do for loops like this. It's broken in
> > various ways. Just do:
> > 
> >   for FILE in *"$1" ; do
> >
> 
> Being a self taught script writer I just have to ask what are the
> 'various ways' in which the first form is broken?
> 
The biggest one I can see is that it spawns an entire process when none
is needed.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Attachment: signature.asc
Description: Digital signature


Reply to: