Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: arrays and spaces in file names?



I need the intermediate step of putting the filenames in an array for other reasons.

Thanks!



On 5/25/06, Mikael Magnusson < mikachu@xxxxxxxxx> wrote:
On 5/24/06, reckoner < sam.reckoner@xxxxxxxxx> wrote:
> I want to do something like
>
> % names=(`find . -print`)
>
> and then something like
>
> % for i in names do;...;done
>
> The problem is that some of the filenames have spaces in them and the
> array elements split on these spaces. I read the manpage and can't make
> sense of what to do w/ this.
>
> Help?

Try this,
for i in **/*(.); do foo; bar;  done

> Thanks.

--
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author