Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: shuffle array
- X-seq: zsh-users 24479
- From: Marc Chantreux <eiro@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: shuffle array
- Date: Fri, 29 Nov 2019 09:43:04 +0100
- Dkim-filter: OpenDKIM Filter v2.10.3 aurora-borealis.phear.org 5EF19123F5
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=phear.org; s=20180217; t=1575016986; bh=eW6wZB3XZU2dU6XS2hx+wpAdzqKVKOCe77x+M7c7dBc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=RbTX0eV6ElgYUKiTQRxy7vWmoW4jOXHvWgV0XMlLn677igrlMcxDrAnpGfCly9NnS 9L6g82HtRhRjqQaGpfVfdC9dKPDov50W0+xw+DN00WrqypFqLQzscD2XOAUd9Gjxis QpTHxaSMyMsFIUX71Q7BY0Fx7Y4c2YSF99x7xPeYd8T16kT0++M9/OOxJEWyBj/Grt U4eObmN8HAXDDiiYKd0NPEmmqGqPwEsiPo1Vr9rvLsl/euivIDMtXCF7ygSkQsNou+ +rUeaNi2AsJORcW850pebDwzY7ymhUYfUxykuBSjMaaiOBdnHme0MzjD7TheuFMvvj EXyybZ8Z8Qpkw==
- In-reply-to: <8636e7w0w9.fsf@zoho.eu>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <867e3jxtao.fsf@zoho.eu> <20191129064215.GA14095@prometheus.u-strasbg.fr> <8636e7w0w9.fsf@zoho.eu>
> > print -l $array |shuff|read -A array
> The first two steps work, but the result array
> seems to have only one element?
those filters shuffle lines so you need to print 1 element per line
(-l).
can you show us examples?
regards
marc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author