Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
argv subscript range uses too many memory
- X-seq: zsh-users 17384
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-user <zsh-users@xxxxxxx>
- Subject: argv subscript range uses too many memory
- Date: Thu, 8 Nov 2012 16:40:01 +0800
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
This script on my laptop uses so much memory so that being killed by
oom-killer:
arr=(~/**/*)
set -- "${(@)arr}"
while ((ARGC))
do
print -- "${argv[1,3]}"
shift 3
done
But if change the subscript range to single array elements, it works
just fine. So I suspect there is something wrong with the subscript
range.
Any thoughts?
Thanks in advance.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author