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

Re: zsh equivalent to string manipulation with offset and length



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