Subject: Re: This has GOT to be a bug in ksh...
To: None <netbsd-users@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 06/17/2002 13:27:35
[ On Monday, June 17, 2002 at 08:40:50 (-0700), Ben Collver wrote: ]
> Subject: Re: This has GOT to be a bug in ksh...
>
> > $ touch "Berra äter ost" "Lisa visar rattarna"
> > $ for f in `find . -type f | sed -e 's/\(.*\)/"\1"/'` ; do echo $f ; done
> > "./Berra
> > äter
> > ost"
> > "./Lisa
> > visar
> > rattarna"
> > $
>
> Oh yeah, I've run into this before. I never found a fix but here is a
> slow workaround.
>
> find . -type f | (while read f; do echo "$f"; done)
What's "slow" about it? (it can be infinitely faster for a really large
number of files where "for f in *" will fail ;-)
Why the extra sub-shell? (not that it will add appreciably to the
execution wallclock time if anything's being done with the file
contents)
--
Greg A. Woods
+1 416 218-0098; <gwoods@acm.org>; <g.a.woods@ieee.org>; <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>