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 13355
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: xulxer <xulxer@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: zsh equivalent to string manipulation with offset and length
- Date: Mon, 20 Oct 2008 11:06:59 -0500
- In-reply-to: <20081020112147.GA27624@xxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20081020111506.GA5609@siduxbox> <20081020112147.GA27624@xxxxxxxx>
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.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author