Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh equivalent to string manipulation with offset and length
- X-seq: zsh-users 13356
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: zsh equivalent to string manipulation with offset and length
- Date: Mon, 20 Oct 2008 13:16:25 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=sHsKlP/3K5Ud1+6rvn1hxVmAUfQvFislnCbO5PnjbrE=; b=o+wksMffgzvc8kqRCqKRdVjJ+ZgcXhBNzybBllTCmcDXvdFXpgTjf27Hm1C8YWlii+ HtFjOjicGssgK3+Zv+AERQtaPIZgIrqIUXMAllBe1x2t7tSic+KNNMLLhjEQc59iOGVC 1gwPHt8DcxWWhDv07X9cWV4jjb1HC59HlwbHE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=WhQIzqdzFQUMT5YJVa8pnmBbLVY0NjdGY1VlrQbTfQvqj/5oYR44tg26CeLzDec1Ih wqKSNwVGSiekipQaTqr3A75/pj8N/nEwPT+qQrjSQFefRWH+w287d1svOCrv20IS+/LV 4XCWoRfKmo0WkBnAowLazcNz/4cEetsiVVduE=
- In-reply-to: <20081020160658.GQ99270@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20081020111506.GA5609@siduxbox> <20081020112147.GA27624@xxxxxxxx> <20081020160658.GQ99270@xxxxxxxxxxxxxxxx>
On Mon, Oct 20, 2008 at 12:06 PM, Dan Nelson <dnelson@xxxxxxxxxxxxxxx> wrote:
> In the last episode (Oct 20), Clint Adams said:
>> On Mon, Oct 20, 2008 at 01:15:06PM +0200, xulxer wrote:
>> > string="abcdefghijklmnopqrstuvwxyz"
>> > echo ${string:10:5}
>>
>> string="abcdefghijklmnopqrstuvwxyz"
>> print ${string[11,15]}
>
> , which matches the syntax for accessing array elements, and is much
> more readable than bash's syntax imho.
^^^^^^^
bash's and ksh's syntax. Given this, it would be a nice feature to add
when the KSHARRAYS option is set.
>
> --
> Dan Nelson
> dnelson@xxxxxxxxxxxxxxx
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author